Browse Source

优化代码

java110 4 years ago
parent
commit
31f6590160
1 changed files with 1 additions and 1 deletions
  1. 1 1
      java110-db/src/main/java/com/java110/db/DataSourceConfig.java

+ 1 - 1
java110-db/src/main/java/com/java110/db/DataSourceConfig.java

@@ -41,7 +41,7 @@ public class DataSourceConfig {
         String path = SHARDING_YML_PATH;
         String path = SHARDING_YML_PATH;
 
 
         String[] actives = env.getActiveProfiles();
         String[] actives = env.getActiveProfiles();
-        if (actives != null && actives.length > 0) {
+        if (actives != null && actives.length > 0 && !"dev".equals(actives[0])) {
             path = "dataSource-" + actives[0] + ".yml";
             path = "dataSource-" + actives[0] + ".yml";
         }
         }