Merge pull request #43812 from vpavic
* gh-43812: Polish "Add support for AWS Advanced JDBC Wrapper" Add support for AWS Advanced JDBC Wrapper Closes gh-43812
This commit is contained in:
commit
c7d419becb
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -62,8 +62,8 @@ class BatchDataSourceScriptDatabaseInitializerTests {
|
|||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@EnumSource(value = DatabaseDriver.class, mode = Mode.EXCLUDE, names = { "CLICKHOUSE", "FIREBIRD", "INFORMIX",
|
||||
"JTDS", "PHOENIX", "REDSHIFT", "TERADATA", "TESTCONTAINERS", "UNKNOWN" })
|
||||
@EnumSource(value = DatabaseDriver.class, mode = Mode.EXCLUDE, names = { "AWS_JDBC_WRAPPER", "CLICKHOUSE",
|
||||
"FIREBIRD", "INFORMIX", "JTDS", "PHOENIX", "REDSHIFT", "TERADATA", "TESTCONTAINERS", "UNKNOWN" })
|
||||
void batchSchemaCanBeLocated(DatabaseDriver driver) throws SQLException {
|
||||
DefaultResourceLoader resourceLoader = new DefaultResourceLoader();
|
||||
BatchProperties properties = new BatchProperties();
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@ bom {
|
|||
]
|
||||
}
|
||||
}
|
||||
library("AWS Advanced JDBC Wrapper", "2.5.4") {
|
||||
group("software.amazon.jdbc") {
|
||||
modules = [
|
||||
"aws-advanced-jdbc-wrapper"
|
||||
]
|
||||
}
|
||||
}
|
||||
library("C3P0", "0.9.5.5") {
|
||||
group("com.mchange") {
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -100,6 +100,9 @@ dependencies {
|
|||
optional("org.yaml:snakeyaml")
|
||||
optional("org.jetbrains.kotlin:kotlin-reflect")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib")
|
||||
optional("software.amazon.jdbc:aws-advanced-jdbc-wrapper") {
|
||||
exclude(group: "commons-logging", module: "commons-logging")
|
||||
}
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation("org.springframework:spring-core-test")
|
||||
|
|
|
|||
|
|
@ -218,6 +218,19 @@ public enum DatabaseDriver {
|
|||
return Arrays.asList("ch", "clickhouse");
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* AWS Advanced JDBC Wrapper.
|
||||
* @since 3.5.0
|
||||
*/
|
||||
AWS_WRAPPER(null, "software.amazon.jdbc.Driver") {
|
||||
|
||||
@Override
|
||||
protected Collection<String> getUrlPrefixes() {
|
||||
return Collections.singleton("aws-wrapper");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
private final String productName;
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ class DatabaseDriverTests {
|
|||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:clickhouse://localhost:3306/sample"))
|
||||
.isEqualTo(DatabaseDriver.CLICKHOUSE);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:ch://localhost:3306/sample")).isEqualTo(DatabaseDriver.CLICKHOUSE);
|
||||
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:aws-wrapper:postgresql://127.0.0.1:5432/sample"))
|
||||
.isEqualTo(DatabaseDriver.AWS_WRAPPER);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue