@ -55,7 +55,8 @@ public class EmbeddedDataSourceConfiguration implements BeanClassLoaderAware {
@@ -55,7 +55,8 @@ public class EmbeddedDataSourceConfiguration implements BeanClassLoaderAware {
@ -596,6 +596,7 @@ content into your application; rather pick only the properties that you need.
@@ -596,6 +596,7 @@ content into your application; rather pick only the properties that you need.
spring.datasource.data-password= # Password of the database to execute DML scripts (if different).
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).
@ -2653,6 +2653,14 @@ http://hsqldb.org/[HSQL] and http://db.apache.org/derby/[Derby] databases. You d
@@ -2653,6 +2653,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`.