Polish contribution

Closes gh-7004
This commit is contained in:
Stephane Nicoll
2016-10-06 13:28:23 +02:00
parent 7fcb197092
commit 03961e6692
6 changed files with 79 additions and 33 deletions

View File

@@ -620,6 +620,7 @@ content into your application; rather pick only the properties that you need.
spring.datasource.dbcp.*= # Commons DBCP specific settings
spring.datasource.dbcp2.*= # Commons DBCP2 specific settings
spring.datasource.driver-class-name= # Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
spring.datasource.generate-unique-name=false # Generate a random datasource name.
spring.datasource.hikari.*= # Hikari specific settings
spring.datasource.initialize=true # Populate the database using 'data.sql'.
spring.datasource.jmx-enabled=false # Enable JMX support (if provided by the underlying pool).

View File

@@ -2655,6 +2655,14 @@ http://hsqldb.org/[HSQL] and http://db.apache.org/derby/[Derby] databases. You d
to provide any connection URLs, simply include a build dependency to the embedded database
that you want to use.
[NOTE]
====
If you are using this feature in your tests, you may notice that the same database is
reused by your whole test suite regardless of the number of application contexts that
you use. If you want to make sure that each context has a separate embedded database,
you should set `spring.datasource.generate-unique-name` to `true`.
====
For example, typical POM dependencies would be:
[source,xml,indent=0]