JAVA-21601 | Using oracle Starter instead of Multiple dependencies. (#14326)

This commit is contained in:
Gaetano Piazzolla 2023-06-30 12:49:14 +02:00 committed by GitHub
parent 8e800d1a2d
commit 673673cad8
2 changed files with 6 additions and 16 deletions

View File

@ -111,19 +111,10 @@
<artifactId>hsqldb</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${oracle-database.version}</version>
</dependency>
<dependency>
<groupId>com.oracle.database.ha</groupId>
<artifactId>ons</artifactId>
<version>${oracle-database.version}</version>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ucp</artifactId>
<version>${oracle-database.version}</version>
<groupId>com.oracle.database.spring</groupId>
<artifactId>oracle-spring-boot-starter-ucp</artifactId>
<version>3.1.0</version> <!-- or 2.7.7 for Spring Boot 2.x -->
<type>pom</type>
</dependency>
</dependencies>

View File

@ -15,7 +15,7 @@ import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {SpringOraclePoolingApplication.class})
@ActiveProfiles({"oracle-pooling-basic"})
@TestPropertySource(properties = "spring.datasource.type=oracle.ucp.jdbc.UCPDataSource")
@TestPropertySource(properties = "spring.datasource.type=oracle.ucp.jdbc.PoolDataSource")
public class SpringOraclePoolingApplicationOracleUCPLiveTest {
@Autowired
@ -23,8 +23,7 @@ public class SpringOraclePoolingApplicationOracleUCPLiveTest {
@Test
public void givenOracleUCPConfiguration_thenBuildsOraclePoolDataSource() {
assertTrue(dataSource instanceof oracle.ucp.jdbc.UCPDataSource);
assertTrue(dataSource instanceof oracle.ucp.jdbc.PoolDataSource);
}
}