Skip to content

Commit 3a15287

Browse files
committed
Fix detection for Microsoft SQL Server
Closes gh-8222
1 parent 9247cd9 commit 3a15287

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -100,7 +100,7 @@ public enum DatabaseDriver {
100100
/**
101101
* SQL Server.
102102
*/
103-
SQLSERVER("SQL SERVER", "com.microsoft.sqlserver.jdbc.SQLServerDriver",
103+
SQLSERVER("Microsoft SQL Server", "com.microsoft.sqlserver.jdbc.SQLServerDriver",
104104
"com.microsoft.sqlserver.jdbc.SQLServerXADataSource", "SELECT 1"),
105105

106106
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ public void databaseProductNameLookups() throws Exception {
8484
.isEqualTo(DatabaseDriver.ORACLE);
8585
assertThat(DatabaseDriver.fromProductName("PostgreSQL"))
8686
.isEqualTo(DatabaseDriver.POSTGRESQL);
87-
assertThat(DatabaseDriver.fromProductName("SQL SERVER"))
87+
assertThat(DatabaseDriver.fromProductName("Microsoft SQL Server"))
8888
.isEqualTo(DatabaseDriver.SQLSERVER);
8989
assertThat(DatabaseDriver.fromProductName("DB2")).isEqualTo(DatabaseDriver.DB2);
9090
assertThat(DatabaseDriver.fromProductName("Firebird 2.5.WI"))

0 commit comments

Comments
 (0)