| | |
| | | import java.util.Arrays; |
| | | |
| | | @Configuration |
| | | @MapperScan(basePackages = {"com.gkhy.safePlatform.goalManage"}, |
| | | @MapperScan(basePackages = {"com.gkhy.safePlatform.targetDuty"}, |
| | | sqlSessionTemplateRef = "sqlTemplateGoalManage",annotationClass = |
| | | Repository.class) |
| | | public class MyBatisConfigGoalManage { |
| | |
| | | throws Exception |
| | | { |
| | | MybatisSqlSessionFactoryBean factoryBean = new MybatisSqlSessionFactoryBean(); |
| | | factoryBean.setDataSource(dataSource); |
| | | factoryBean.setDataSource(dsGoalManage); |
| | | ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); |
| | | |
| | | //------------------- |
| | | Resource[] rs1 = resolver.getResources("classpath*:config/mapper/goalManage/**Mapper.xml"); |
| | | Resource[] rs1 = resolver.getResources("classpath*:config/mapper/goalManage/**/**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))); |