Importing Data with spring boot

后端 未结 5 1147
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-05 07:21

I have flyway and spring-boot working correctly, but I can\'t seem to wire up my spring.datasource.data correctly.

If I have a file src/main/resou

5条回答
  •  离开以前
    2021-01-05 07:50

    As i can see it, Spring Boot executes the data scripts if one of the following conditions is true:

    • The schema.sql script is present and the initialization is enabled (spring.datasource.initialize=true)
    • If JPA and Hibernate is used and autoconfigured with Spring Boot: The property hibernate.hbm2ddl.auto is present (the value doesn't matter, you can give it an empty string or just "validate") and the initialization is enabled (spring.datasource.initialize=true).

提交回复
热议问题