Sunday, December 28, 2014

How to execute initialization SQLs in Spring Boot

To execute initialization SQLs,

put the SQLs in 'data.sql' located in the root of the classpath.

You can turn off the feature with the following property in application.properties:

spring.datasource.initialize=false

Reference:
http://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html

No comments:

Post a Comment