Repository: apache/shardingsphere
Issue: Support new line for YAML configuration

Please answer these questions before submitting your issue. Thanks!

获取数据源换行
String dataSources = propertyResolver.getProperty("names");


建议   OrchestrationSpringBootConfiguration文件

line77

String dataSources = propertyResolver.getProperty("names");

加一个去空格处理

改为  String dataSources = propertyResolver.getProperty("names").trim();

### Which version of Sharding-Jdbc do you using?

### Expected behavior

### Actual behavior

### Steps to reproduce the behavior

### Please provide the reproduce example codes (such as github link)

Code should based on https://github.com/shardingjdbc/sharding-jdbc-example


Changed files:
sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-boot-starter/src/main/java/io/shardingjdbc/orchestration/spring/boot/OrchestrationSpringBootConfiguration.java

diff --git a/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-boot-starter/src/main/java/io/shardingjdbc/orchestration/spring/boot/OrchestrationSpringBootConfiguration.java b/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-boot-starter/src/main/java/io/shardingjdbc/orchestration/spring/boot/OrchestrationSpringBootConfiguration.java
index c275da9b59b..1b598f8b581 100644
--- a/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-boot-starter/src/main/java/io/shardingjdbc/orchestration/spring/boot/OrchestrationSpringBootConfiguration.java
+++ b/sharding-jdbc-orchestration-spring/sharding-jdbc-orchestration-spring-boot-starter/src/main/java/io/shardingjdbc/orchestration/spring/boot/OrchestrationSpringBootConfiguration.java
@@ -32,6 +32,7 @@ import org.springframework.context.EnvironmentAware;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.core.env.Environment;
+import org.springframework.util.StringUtils;
 
 import javax.sql.DataSource;
 import java.sql.SQLException;
@@ -75,15 +76,17 @@ public class OrchestrationSpringBootConfiguration implements EnvironmentAware {
     private void setDataSourceMap(final Environment environment) {
         RelaxedPropertyResolver propertyResolver = new RelaxedPropertyResolver(environment, "sharding.jdbc.datasource.");
         String dataSources = propertyResolver.getProperty("names");
+        Preconditions.checkState(!StringUtils.isEmpty(dataSources), "Wrong datasource properties, empty datasource !");
+        dataSources = dataSources.trim();
         for (String each : dataSources.split(",")) {
-            try {
-                Map<String, Object> dataSourceProps = propertyResolver.getSubProperties(each + ".");
-                Preconditions.checkState(!dataSourceProps.isEmpty(), "Wrong datasource properties!");
-                DataSource dataSource = DataSourceUtil.getDataSource(dataSourceProps.get("type").toString(), dataSourceProps);
-                dataSourceMap.put(each, dataSource);
-            } catch (final ReflectiveOperationException ex) {
-                throw new ShardingJdbcException("Can't find datasource type!", ex);
-            }
+        	try {
+        		Map<String, Object> dataSourceProps = propertyResolver.getSubProperties(each + ".");
+        		Preconditions.checkState(!dataSourceProps.isEmpty(), String.format("Wrong datasource [%s] properties!", each));
+        		DataSource dataSource = DataSourceUtil.getDataSource(dataSourceProps.get("type").toString(), dataSourceProps);
+        		dataSourceMap.put(each, dataSource);
+        	} catch (final ReflectiveOperationException ex) {
+        		throw new ShardingJdbcException("Can't find datasource type!", ex);
+        	}
         }
     }
 }