Skip to content

Commit

Permalink
BIGTOP-4223: Support PostgreSQL for mybatis on Bigtop Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxiaofengfu committed Sep 12, 2024
1 parent 0b89afc commit 10dd256
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public class MyBatisConfig {
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception {
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setMapperLocations(
new PathMatchingResourcePatternResolver().getResources(
String.format("classpath*:mapper/%s/**/*Mapper.xml",
new ProductNameDatabaseIdProvider().getDatabaseId(dataSource))));
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver()
.getResources(String.format(
"classpath*:mapper/%s/**/*Mapper.xml",
new ProductNameDatabaseIdProvider().getDatabaseId(dataSource))));

org.apache.ibatis.session.Configuration configuration = new org.apache.ibatis.session.Configuration();
configuration.setMapUnderscoreToCamelCase(true);
Expand Down

0 comments on commit 10dd256

Please sign in to comment.