Welcome to the Treehouse Community
Looking to learn something new?
Sean Smith13,797 Points
DatabaseLoader for production app?
Does using the DatabaseLoader to populate a database make sense for an app that will see production? If not, is there a better or more scaleable approach that I should be taking?
Alexander NikiforovJava Web Development Techdegree Graduate 22,161 Points
I think the better way is to have actual database with values, and just read the data properly from it into application.
This way other people that actually create Data for you can fill data elsewhere.
DataLoader is especially nice for testing purposes.
Since Spring Boot 1.4. You can simply annotate it with
@TestComponent and this way it will be used only in testing purposes. Thus you don't need to keep temporary databases for Unit Tests.