Spring-boot: spring.datasource.initialize=false Does not disable loading of data-${platform}.sql

Created on 5 Aug 2014  路  1Comment  路  Source: spring-projects/spring-boot

When setting the flag spring.datasource.initialize=false, the data-${platform}.sql and data.sql files are always loaded.

This comes after the refactoring "Defer SQL initialization to fit with JPA better" that fixes "gh-1006" (done on june 2nd, commit id 49a09c807c437ad9b668652a89ea70c122aff89a)

This behaviour is different than specified in the chpater "63.3 Initialize a database using Spring JDBC" of the documentation.

bug

Most helpful comment

I agree this is a bug, but I think it only happens if you a) use Hibernate and b) set ddlAuto to something non-null. I suggest not setting spring.jpa.hibernate.ddlAuto.

>All comments

I agree this is a bug, but I think it only happens if you a) use Hibernate and b) set ddlAuto to something non-null. I suggest not setting spring.jpa.hibernate.ddlAuto.

Was this page helpful?
0 / 5 - 0 ratings