diff --git a/spring-boot-project/spring-boot-autoconfigure/pom.xml b/spring-boot-project/spring-boot-autoconfigure/pom.xml
index 9f915f5d5b..b54887fd6e 100755
--- a/spring-boot-project/spring-boot-autoconfigure/pom.xml
+++ b/spring-boot-project/spring-boot-autoconfigure/pom.xml
@@ -877,6 +877,11 @@
transactions-jms
test
+
+ com.ibm.db2
+ jcc
+ test
+
com.jayway.jsonpath
json-path
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/XADataSourceAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/XADataSourceAutoConfiguration.java
index ccc56ca16f..81ef4e642d 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/XADataSourceAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/XADataSourceAutoConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2019 the original author or authors.
+ * Copyright 2012-2020 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.
@@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.springframework.boot.autoconfigure.jdbc;
+import java.util.HashMap;
+import java.util.Map;
+
import javax.sql.DataSource;
import javax.sql.XADataSource;
import javax.transaction.TransactionManager;
@@ -28,6 +30,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.DataSourceBeanCreationException;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
@@ -102,11 +105,17 @@ public class XADataSourceAutoConfiguration implements BeanClassLoaderAware {
}
private ConfigurationPropertySource getBinderSource(DataSourceProperties dataSourceProperties) {
- MapConfigurationPropertySource source = new MapConfigurationPropertySource();
- source.put("user", dataSourceProperties.determineUsername());
- source.put("password", dataSourceProperties.determinePassword());
- source.put("url", dataSourceProperties.determineUrl());
- source.putAll(dataSourceProperties.getXa().getProperties());
+ Map