From 3a15287c071245464ef0bcde48376bae2f2403e0 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 8 Feb 2017 14:04:24 +0100 Subject: [PATCH] Fix detection for Microsoft SQL Server Closes gh-8222 --- .../java/org/springframework/boot/jdbc/DatabaseDriver.java | 4 ++-- .../org/springframework/boot/jdbc/DatabaseDriverTests.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java b/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java index af928e48b11..1ba0178c860 100644 --- a/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java +++ b/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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. @@ -100,7 +100,7 @@ public enum DatabaseDriver { /** * SQL Server. */ - SQLSERVER("SQL SERVER", "com.microsoft.sqlserver.jdbc.SQLServerDriver", + SQLSERVER("Microsoft SQL Server", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "com.microsoft.sqlserver.jdbc.SQLServerXADataSource", "SELECT 1"), /** diff --git a/spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverTests.java b/spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverTests.java index 5333b4785ad..bf31471edbc 100644 --- a/spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/jdbc/DatabaseDriverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2017 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. @@ -84,7 +84,7 @@ public class DatabaseDriverTests { .isEqualTo(DatabaseDriver.ORACLE); assertThat(DatabaseDriver.fromProductName("PostgreSQL")) .isEqualTo(DatabaseDriver.POSTGRESQL); - assertThat(DatabaseDriver.fromProductName("SQL SERVER")) + assertThat(DatabaseDriver.fromProductName("Microsoft SQL Server")) .isEqualTo(DatabaseDriver.SQLSERVER); assertThat(DatabaseDriver.fromProductName("DB2")).isEqualTo(DatabaseDriver.DB2); assertThat(DatabaseDriver.fromProductName("Firebird 2.5.WI"))