From 8656402ca60c3748bb695d5636ccd41d7564d401 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 26 Aug 2014 10:48:06 -0700 Subject: [PATCH] Polish database docs section --- .../src/main/asciidoc/appendix-application-properties.adoc | 2 +- spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 61b7c378bb..49a2045a4e 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -171,7 +171,7 @@ content into your application; rather pick only the properties that you need. 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.separator=; # statement separator in SQL initialization scripts - spring.datasource.driverClassName= # JDBC Settings... + spring.datasource.driver-class-name= # JDBC Settings... spring.datasource.url= spring.datasource.username= spring.datasource.password= diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 4d22cf0b74..9093b2abe2 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1258,12 +1258,15 @@ in `application.properties`: spring.datasource.url=jdbc:mysql://localhost/test spring.datasource.username=dbuser spring.datasource.password=dbpass - spring.datasource.driverClassName=com.mysql.jdbc.Driver + spring.datasource.driver-class-name=com.mysql.jdbc.Driver ---- See {sc-spring-boot-autoconfigure}/jdbc/DataSourceProperties.{sc-ext}[`DataSourceProperties`] for more of the supported options. +TIP: You often won't need to specify the `driver-class-name` since Spring boot can deduce +it for most databases from the `url`. + NOTE: For a pooling `DataSource` to be created we need to be able to verify that a valid `Driver` class is available, so we check for that before doing anything. I.e. if you set `spring.datasource.driverClassName=com.mysql.jdbc.Driver` then that class has to be