From 96830a550af27c9caed4a7c0abad6131aae8ec14 Mon Sep 17 00:00:00 2001 From: Marten Deinum Date: Thu, 8 Oct 2015 08:59:39 +0200 Subject: [PATCH 1/2] Add support for the DB2 Universal JDBC driver Closes gh-4114 --- .../boot/autoconfigure/jdbc/DatabaseDriver.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java index 06944593a9a..43c85c27b66 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java @@ -87,7 +87,12 @@ enum DatabaseDriver { * SQL Server. */ SQLSERVER("com.microsoft.sqlserver.jdbc.SQLServerDriver", - "com.microsoft.sqlserver.jdbc.SQLServerXADataSource"); + "com.microsoft.sqlserver.jdbc.SQLServerXADataSource"), + + /** + * DB2 Server. + */ + DB2("com.ibm.db2.jcc.DB2Driver", "com.ibm.db2.jcc.DB2XADataSource"); private final String driverClassName; From 7971ef24ce5151560fb8a346eae8d9807b79a6ba Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 9 Oct 2015 17:05:06 +0200 Subject: [PATCH 2/2] Polish Closes gh-4119 --- .../boot/autoconfigure/jdbc/DatabaseDriver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java index 43c85c27b66..a5baa919b15 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2015 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. @@ -24,6 +24,7 @@ import org.springframework.util.StringUtils; * * @author Phillip Webb * @author Maciej Walkowiak + * @author Marten Deinum * @since 1.2.0 */ enum DatabaseDriver {