Skip to content

Commit 265bf26

Browse files
committed
添加实例化Enhance Dsl Factory 方法
1 parent cb4ebea commit 265bf26

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

api-boot-project/api-boot-autoconfigure/src/main/java/org/minbox/framework/api/boot/autoconfigure/enhance/ApiBootMyBatisEnhanceAutoConfiguration.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919

2020
import com.gitee.hengboy.mybatis.enhance.EnhanceClassPathMapperScanner;
2121
import com.gitee.hengboy.mybatis.enhance.MapperFactoryBean;
22+
import com.gitee.hengboy.mybatis.enhance.dsl.factory.EnhanceDslFactory;
2223
import com.gitee.hengboy.mybatis.enhance.mapper.EnhanceMapper;
2324
import org.apache.ibatis.mapping.DatabaseIdProvider;
2425
import org.apache.ibatis.plugin.Interceptor;
2526
import org.apache.ibatis.session.Configuration;
2627
import org.apache.ibatis.session.ExecutorType;
28+
import org.apache.ibatis.session.SqlSession;
2729
import org.apache.ibatis.session.SqlSessionFactory;
2830
import org.mybatis.spring.SqlSessionFactoryBean;
2931
import org.mybatis.spring.SqlSessionTemplate;
@@ -170,6 +172,18 @@ public SqlSessionTemplate sqlSessionTemplate(SqlSessionFactory sqlSessionFactory
170172
}
171173
}
172174

175+
/**
176+
* EnhanceDslFactory Instance
177+
* Use to create dsl
178+
*
179+
* @return EnhanceDslFactory
180+
*/
181+
@Bean
182+
@ConditionalOnMissingBean
183+
public EnhanceDslFactory enhanceDslFactory(SqlSession sqlSession) {
184+
return new EnhanceDslFactory(sqlSession);
185+
}
186+
173187
/**
174188
* This will just scan the same base package as Spring Boot does. If you want
175189
* more power, you can explicitly use

0 commit comments

Comments
 (0)