Browse Source

DATAJDBC-555 - Document supported databases.

Original pull request: #225.
pull/229/head
Mark Paluch 6 years ago committed by Jens Schauder
parent
commit
8ef047c3a6
No known key found for this signature in database
GPG Key ID: 996B1389BA0721C3
  1. 11
      src/main/asciidoc/jdbc.adoc
  2. 13
      src/main/asciidoc/preface.adoc

11
src/main/asciidoc/jdbc.adoc

@ -169,13 +169,20 @@ There are a couple of things one might want to customize in this setup. @@ -169,13 +169,20 @@ There are a couple of things one might want to customize in this setup.
=== Dialects
Spring Data JDBC uses implementations of the interface `Dialect` to encapsulate behavior that is specific to a database or its JDBC driver.
By default the `AbstractJdbcConfiguration` tries to determine the database in use an register the correct `Dialect`.
By default, the `AbstractJdbcConfiguration` tries to determine the database in use an register the correct `Dialect`.
This behavior can be changed by overwriting `jdbcDialect(NamedParameterJdbcOperations)`.
TIP: Dialects are resolved by [`JdbcDialectResolver`] from `JdbcOperations`, typically by inspecting `Connection`.
TIP: Dialects are resolved by `JdbcDialectResolver` from `JdbcOperations`, typically by inspecting `Connection`.
You can let Spring auto-discover your `Dialect` by registering a class that implements `org.springframework.data.jdbc.repository.config.DialectResolver$JdbcDialectProvider` through `META-INF/spring.factories`.
`DialectResolver` discovers dialect provider implementations from the class path using Spring's `SpringFactoriesLoader`.
If you use a database for which no dialect is available, then your application won’t startup. In that case, you’ll have to ask your vendor to provide a `Dialect` implementation. Alternatively, you can:
1. Implement your own `Dialect`.
2. Implement a `JdbcDialectProvider` returning the `Dialect`.
3. Register the provider by creating a `spring.factories` resource under `META-INF` and perform the registration by adding a line +
`org.springframework.data.jdbc.repository.config.DialectResolver$JdbcDialectProvider=<fully qualified name of your JdbcDialectProvider>`
[[jdbc.entity-persistence]]
== Persisting Entities

13
src/main/asciidoc/preface.adoc

@ -37,6 +37,19 @@ See the Spring framework https://spring.io/docs[home page] for more information. @@ -37,6 +37,19 @@ See the Spring framework https://spring.io/docs[home page] for more information.
The Spring Data JDBC binaries require JDK level 8.0 and above and https://spring.io/docs[Spring Framework] {springVersion} and above.
In terms of databases, Spring Data JDBC requires a <<jdbc.dialects,dialect>> to abstract common SQL functionality over vendor-specific flavours.
Support for the following databases is bundled with Spring Data JDBC binaries:
* DB2
* H2
* HSQLDB
* MariaDB
* Microsoft SQL Server
* MySQL
* Postgres
If you use a different database then your application won’t startup. The <<jdbc.dialects,dialect>> section contains further detail on how to proceed in such case.
[[get-started:help]]
== Additional Help Resources

Loading…
Cancel
Save