|
|
@ -34,7 +34,7 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
|
|
|
@ConditionalOnProperty(value = "spring.datasource.hikari.secondary.username")
|
|
|
|
@ConditionalOnProperty(value = "spring.datasource.hikari.secondary.username")
|
|
|
|
@MapperScan(
|
|
|
|
@MapperScan(
|
|
|
|
basePackages = {
|
|
|
|
basePackages = {
|
|
|
|
"kr.xit.biz.other.mapper"
|
|
|
|
"kr.xit.other.mapper"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
sqlSessionFactoryRef = Constants.SECONDARY_SQL_SESSION
|
|
|
|
sqlSessionFactoryRef = Constants.SECONDARY_SQL_SESSION
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -50,7 +50,6 @@ public class SecondaryMybatisConfig {
|
|
|
|
sessionFactory.setDataSource(dataSource);
|
|
|
|
sessionFactory.setDataSource(dataSource);
|
|
|
|
sessionFactory.setConfigLocation(resolver.getResource(MYBATIS_CONFIG_FILE));
|
|
|
|
sessionFactory.setConfigLocation(resolver.getResource(MYBATIS_CONFIG_FILE));
|
|
|
|
sessionFactory.setMapperLocations(resolver.getResources(String.format("classpath:/egovframework/mapper/**/*-%s-mapper.xml", database)));
|
|
|
|
sessionFactory.setMapperLocations(resolver.getResources(String.format("classpath:/egovframework/mapper/**/*-%s-mapper.xml", database)));
|
|
|
|
System.out.println("database:"+database);
|
|
|
|
|
|
|
|
return sessionFactory.getObject();
|
|
|
|
return sessionFactory.getObject();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|