safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/DruidConfig.java
@@ -38,7 +38,7 @@ @Bean(name = "dsGoalManage") @Primary @Autowired public DataSource dsAccount(Environment env) { public DataSource dsGoalManage(Environment env) { AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); Properties prop = build(env, "spring.datasource.goalmanage."); // ds.setXaDataSourceClassName("com.alibaba.druid.pool.xa.DruidXADataSource"); @@ -54,7 +54,7 @@ @Autowired @Primary @Bean(name = "dsEmergency") public AtomikosDataSourceBean dsDoublePrevent(Environment env) { public AtomikosDataSourceBean dsEmergency(Environment env) { AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); Properties prop = build(env, "spring.datasource.emergency."); // ds.setXaDataSourceClassName("com.alibaba.druid.pool.xa.DruidXADataSource"); @@ -68,7 +68,7 @@ @Autowired @Primary @Bean(name = "dsIncidentManage") public AtomikosDataSourceBean dsSafeCheck(Environment env) { public AtomikosDataSourceBean dsIncidentManage(Environment env) { AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); Properties prop = build(env, "spring.datasource.incidentmanage."); ds.setXaDataSourceClassName(datasourceClass); safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/database/MyBatisConfigEmergency.java
@@ -51,15 +51,11 @@ //------------------- Resource[] rs1 = resolver.getResources("classpath*:config/mapper/emergency/**/**Mapper.xml"); // Resource[] rs2 = resolver.getResources("classpath*:config/mapper/goalManage/**Mapper.xml"); ArrayList<Resource> resourceArrayList = new ArrayList<>(Arrays.asList(rs1)); // resourceArrayList.addAll(new ArrayList<>(Arrays.asList(rs2))); Resource[] resourceArray = new Resource[resourceArrayList.size()]; resourceArrayList.toArray(resourceArray); factoryBean.setMapperLocations(resourceArray); //------------------- // factoryBean.setMapperLocations(resolver.getResources("classpath*:config/mapper/**/**Mapper.xml")); //设置分页插件 Interceptor[] plugins = {mybatisPlusInterceptor}; factoryBean.setPlugins(plugins); safePlatfrom-out-web/src/main/resources/config/application.yaml
@@ -2,11 +2,8 @@ application: name: safeplatform-out profiles: active: test # active: guotai-demo #mybatis-plus: # mapper-locations: classpath:config/mapper/**/*.xml # active: test active: guotai-demo logging: config: classpath:config/log/log4j2.xml