From 7401f7c643badfe6df41b41a57e50636911ddc48 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 18 Apr 2014 10:44:10 -0700 Subject: [PATCH] Correct impression that DataSource platform is discovered automatically ... it isn't: you have to set spring.datasource.platform --- .../src/main/asciidoc/appendix-application-properties.adoc | 1 + spring-boot-docs/src/main/asciidoc/howto.adoc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 0106bf58e3a..f9afc30df9f 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -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= diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index a8ffc4ade56..79727e22551 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -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.