Commit 6492b44e authored by eddie.woo's avatar eddie.woo

modify

parent 09acecda
...@@ -27,6 +27,15 @@ public class MybatisConfig implements InitializingBean { ...@@ -27,6 +27,15 @@ public class MybatisConfig implements InitializingBean {
return bean; return bean;
} }
@Bean
public static MapperScannerConfigurer vatMapperConfigurer() {
MapperScannerConfigurer bean = new MapperScannerConfigurer();
bean.setMarkerInterface(MyVatMapper.class);
bean.setBasePackage(BASE_PACKAGE);
bean.setSqlSessionTemplateBeanName("dynamicSqlSessionTemplate");
return bean;
}
@Bean @Bean
public static MapperScannerConfigurer userMapperConfigurerMail() { public static MapperScannerConfigurer userMapperConfigurerMail() {
MapperScannerConfigurer bean = new MapperScannerConfigurer(); MapperScannerConfigurer bean = new MapperScannerConfigurer();
......
...@@ -81,7 +81,7 @@ public class DataSourcePoolService extends AbstractRoutingDataSource { ...@@ -81,7 +81,7 @@ public class DataSourcePoolService extends AbstractRoutingDataSource {
SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
bean.setDataSource(dynamicDataSource); bean.setDataSource(dynamicDataSource);
bean.setMapperLocations(new PathMatchingResourcePatternResolver() bean.setMapperLocations(new PathMatchingResourcePatternResolver()
.getResources("classpath*:mapper/*.xml")); .getResources("classpath*:pwc/taxtech/atms/vatDao/*Mapper.xml"));
return bean.getObject(); return bean.getObject();
} }
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
<property name="patterns"> <property name="patterns">
<list> <list>
<value>pwc.taxtech.atms.dao.*</value> <value>pwc.taxtech.atms.dao.*</value>
<value>pwc.taxtech.atms.vatDao.*</value>
</list> </list>
</property> </property>
</bean> </bean>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<property name="configLocation" value="classpath:sqlMapConfig.xml" /> <property name="configLocation" value="classpath:sqlMapConfig.xml" />
<property name="mapperLocations"> <property name="mapperLocations">
<array> <array>
<value>classpath:pwc/taxtech/atms/**/*Mapper.xml</value> <value>classpath:pwc/taxtech/atms/dao/*Mapper.xml</value>
</array> </array>
</property> </property>
</bean> </bean>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment