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 35fa7e7 commit 0b89afc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Excepti
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setMapperLocations(
new PathMatchingResourcePatternResolver().getResources(String.format("classpath*:mapper/%s/**/*Mapper.xml", new ProductNameDatabaseIdProvider().getDatabaseId(dataSource))));
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* SQLINES DEMO *** e Apache Software Foundation (ASF) under one
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
Expand Down

0 comments on commit 0b89afc

Please sign in to comment.