Browse Source

Add support for jdbc:firebird: url prefix

See gh-15841
pull/15937/head
Mark Rotteveel 7 years ago committed by Stephane Nicoll
parent
commit
2ab7ece36d
  1. 2
      spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java
  2. 2
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverTests.java

2
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java

@ -140,7 +140,7 @@ public enum DatabaseDriver { @@ -140,7 +140,7 @@ public enum DatabaseDriver {
@Override
protected Collection<String> getUrlPrefixes() {
return Collections.singleton("firebirdsql");
return Arrays.asList("firebirdsql", "firebird");
}
@Override

2
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverTests.java

@ -129,6 +129,8 @@ public class DatabaseDriverTests { @@ -129,6 +129,8 @@ public class DatabaseDriverTests {
.isEqualTo(DatabaseDriver.SQLSERVER);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:firebirdsql://localhost/sample"))
.isEqualTo(DatabaseDriver.FIREBIRD);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:firebird://localhost/sample"))
.isEqualTo(DatabaseDriver.FIREBIRD);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:db2://localhost:50000/sample "))
.isEqualTo(DatabaseDriver.DB2);
assertThat(DatabaseDriver.fromJdbcUrl("jdbc:as400://localhost"))

Loading…
Cancel
Save