Spring Boot Populating Database with test data at startup
Channel:
Subscribers:
11,000
Published on ● Video Link: https://www.youtube.com/watch?v=MBG9wOcTJxI
Populate your Spring Boot application with test data so you are not relying on access to a corporate database when running your tests.
This method can also be used to initialize data that your application needs to work.
The data can be populated in many different ways. Im showing 3 ways in this demo.
* By using data.sql and schema.sql.
* By using the Database populator utility
* By using the entity repository
Enjoy! :) Feel free to comment and ask questions.
The code is located here:
https://github.com/ekim197711/springboot-populate-data
Follow me on twitter:
https://twitter.com/MikeMoelNielsen
Other Videos By Mike Møller Nielsen
Tags:
spring
springboot
springframework
java
h2
database
data
jpa
sql
hibernate
testdata
datarepository