You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/12/30 11:56:00 UTC
[shardingsphere] branch master updated: Fixed #14386 (#14446)
This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 8b61484d8 Fixed #14386 (#14446)
8b61484d8 is described below
commit 8b61484d8ea15537d8ab4bbbe142c4267ea5c705
Author: zhaojinchao <33...@users.noreply.github.com>
AuthorDate: Thu Dec 30 19:55:15 2021 +0800
Fixed #14386 (#14446)
* Fixed
* bug fix
---
.../shardingsphere/spring/boot/ShardingSphereAutoConfiguration.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.java
index b403a07..e94b0c3 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-core-spring/shardingsphere-jdbc-core-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.java
@@ -103,7 +103,8 @@ public class ShardingSphereAutoConfiguration implements EnvironmentAware {
@Bean
@ConditionalOnMissingBean(DataSource.class)
public DataSource dataSource(final ModeConfiguration modeConfig) throws SQLException {
- return ShardingSphereDataSourceFactory.createDataSource(schemaName, modeConfig);
+ return !dataSourceMap.isEmpty() ? ShardingSphereDataSourceFactory.createDataSource(schemaName, modeConfig, dataSourceMap, Collections.emptyList(), props.getProps())
+ : ShardingSphereDataSourceFactory.createDataSource(schemaName, modeConfig);
}
/**