mybatis源码解读:如何获取一个sqlsessionFactory?
1.加载流:
Reader configReader = Resources.getResourceAsReader("org/apache/ibatis/submitted/dynsql/MapperConfig.xml")
2.解析xml得到一个XMLConfigBuilder
public SqlSessionFactory build(Reader reader, String environment, Properties properties) {
try {
...
原创
2020-08-04 16:05:56 ·
845 阅读 ·
0 评论