Move JDBC testcontainers support into spring-boot-jdbc
This commit is contained in:
committed by
Phillip Webb
parent
5c0cda3f7e
commit
9d531caa52
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
</configuration>
|
||||
@@ -0,0 +1 @@
|
||||
spring.test.context.cache.maxSize=1
|
||||
@@ -3,6 +3,7 @@ plugins {
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
@@ -19,6 +20,7 @@ dependencies {
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
optional("com.h2database:h2")
|
||||
optional("com.mchange:c3p0")
|
||||
optional("com.oracle.database.jdbc:ojdbc11")
|
||||
@@ -30,8 +32,14 @@ dependencies {
|
||||
}
|
||||
optional("org.apache.tomcat:tomcat-jdbc")
|
||||
optional("org.postgresql:postgresql")
|
||||
optional("org.testcontainers:jdbc")
|
||||
optional("org.vibur:vibur-dbcp")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
dockerTestImplementation("org.testcontainers:postgresql")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.jdbc;
|
||||
package org.springframework.boot.jdbc.testcontainers;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
</configuration>
|
||||
@@ -0,0 +1 @@
|
||||
spring.test.context.cache.maxSize=1
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.jdbc;
|
||||
package org.springframework.boot.jdbc.testcontainers;
|
||||
|
||||
import org.testcontainers.containers.JdbcDatabaseContainer;
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for testcontainers JDBC service connections.
|
||||
*/
|
||||
package org.springframework.boot.testcontainers.service.connection.jdbc;
|
||||
package org.springframework.boot.jdbc.testcontainers;
|
||||
@@ -3,6 +3,10 @@ org.springframework.boot.diagnostics.FailureAnalyzer=\
|
||||
org.springframework.boot.jdbc.autoconfigure.DataSourceBeanCreationFailureAnalyzer,\
|
||||
org.springframework.boot.jdbc.autoconfigure.HikariDriverConfigurationFailureAnalyzer
|
||||
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.jdbc.testcontainers.JdbcContainerConnectionDetailsFactory
|
||||
|
||||
# Database Initializer Detectors
|
||||
org.springframework.boot.sql.init.dependency.DatabaseInitializerDetector=\
|
||||
org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializerDetector
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.testcontainers.service.connection.flyway.FlywayContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.hazelcast.HazelcastContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.jdbc.JdbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.kafka.ApacheKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.kafka.ConfluentKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.kafka.DeprecatedConfluentKafkaContainerConnectionDetailsFactory,\
|
||||
|
||||
Reference in New Issue
Block a user