|
|
@ -77,9 +77,8 @@ public class MyBatisConfig extends InitConfig { |
|
|
|
Configuration configuration = new Configuration(); |
|
|
|
Configuration configuration = new Configuration(); |
|
|
|
PathMatchingResourcePatternResolver resolver=new PathMatchingResourcePatternResolver(); |
|
|
|
PathMatchingResourcePatternResolver resolver=new PathMatchingResourcePatternResolver(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
String path="classpath*:/"+dataSourceModel.getPackageName().replaceAll("\\.","/")+"/*.xml"; |
|
|
|
LOG.info("Mapper匹配规则"+dataSourceModel.getMapperXmlPath()); |
|
|
|
LOG.info("Mapper匹配规则"+path); |
|
|
|
factoryBean.setMapperLocations(resolver.getResources(dataSourceModel.getMapperXmlPath())); |
|
|
|
factoryBean.setMapperLocations(resolver.getResources(path)); |
|
|
|
|
|
|
|
} catch (IOException e) { |
|
|
|
} catch (IOException e) { |
|
|
|
throw new RuntimeException("mapper匹配规则解析出错"); |
|
|
|
throw new RuntimeException("mapper匹配规则解析出错"); |
|
|
|
} |
|
|
|
} |
|
|
|