@ -24,7 +24,8 @@ import org.springframework.context.annotation.Profile;
import org.springframework.jdbc.core.JdbcTemplate ;
import org.springframework.jdbc.core.JdbcTemplate ;
import org.springframework.jdbc.datasource.DriverManagerDataSource ;
import org.springframework.jdbc.datasource.DriverManagerDataSource ;
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator ;
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator ;
import org.testcontainers.containers.OracleContainer ;
import org.testcontainers.oracle.OracleContainer ;
import org.testcontainers.utility.DockerImageName ;
/ * *
/ * *
* { @link DataSource } setup for Oracle Database XE . Starts a docker container with an Oracle database .
* { @link DataSource } setup for Oracle Database XE . Starts a docker container with an Oracle database .
@ -50,7 +51,10 @@ public class OracleDataSourceConfiguration extends DataSourceConfiguration {
if ( ORACLE_CONTAINER = = null ) {
if ( ORACLE_CONTAINER = = null ) {
LOG . info ( "Oracle starting..." ) ;
LOG . info ( "Oracle starting..." ) ;
OracleContainer container = new OracleContainer ( "gvenzl/oracle-xe:21.3.0-slim" ) . withReuse ( true ) ;
DockerImageName dockerImageName = DockerImageName . parse ( "gvenzl/oracle-free:23.3-slim" ) ;
OracleContainer container = new OracleContainer ( dockerImageName ) //
. withStartupTimeoutSeconds ( 200 ) //
. withReuse ( true ) ;
container . start ( ) ;
container . start ( ) ;
LOG . info ( "Oracle started" ) ;
LOG . info ( "Oracle started" ) ;