Skip to content

Commit 19d9934

Browse files
committed
添加注释
1 parent b1e6b35 commit 19d9934

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Spring-Boot-MultiDS1/src/main/java/com/example/multidatasource/config/MysqlDatasourceConfig.java

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
/**
1818
* Created by dengzhiming on 2019/3/27
19+
*
20+
* 该配置类主要包括:
21+
* 1.@MapperScan注解配置mybatis的扫描路径和sqlSessionFactory的引用
22+
* 2.从属性文件中读取配置用来创建数据源(DataSource)
23+
* 3.引用刚创建的数据源来创建事务管理器(DataSourceTransactionManager)
24+
* 4.创建SqlSessionFactory,并设置使用刚创建的数据源,设置SQL的xml文件为mapperLocation
1925
*/
2026
@Configuration
2127
@MapperScan(basePackages = MysqlDatasourceConfig.PACKAGE, sqlSessionFactoryRef = "mysqlSqlSessionFactory")

0 commit comments

Comments
 (0)