Correct impression that DataSource platform is discovered automatically

... it isn't: you have to set spring.datasource.platform
This commit is contained in:
Dave Syer 2014-04-18 10:44:10 -07:00
parent 7b07fe8ce0
commit 7401f7c643
2 changed files with 3 additions and 1 deletions

View File

@ -106,6 +106,7 @@ content into your application; rather pick only the properties that you need.
spring.datasource.name= # name of the data source
spring.datasource.intialize=true # populate using data.sql
spring.datasource.schema= # a schema resource reference
spring.datasource.platform= # the platform to use in the schema resource (schema-${platform}.sql)
spring.datasource.continueOnError=false # continue even if can't be initialized
spring.datasource.driverClassName= # JDBC Settings...
spring.datasource.url=

View File

@ -1009,7 +1009,8 @@ not something you want to be on the classpath in production. It is a Hibernate f
Spring JDBC has a `DataSource` initializer feature. Spring Boot enables it by default and
loads SQL from the standard locations `schema.sql` and `data.sql` (in the root of the
classpath). In addition Spring Boot will load a file `schema-${platform}.sql` where
`platform` is the vendor name of the database (`hsqldb`, `h2`, `oracle`, `mysql`,
`platform` is the value of `spring.datasource.platform`, e.g. you might choose to set
it to the vendor name of the database (`hsqldb`, `h2`, `oracle`, `mysql`,
`postgresql` etc.). Spring Boot enables the failfast feature of the Spring JDBC
initializer by default, so if the scripts cause exceptions the application will fail
to start.