Skip to content

Commit e3b25d3

Browse files
committed
在yaml中实现mybatis的配置
1 parent a322747 commit e3b25d3

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/main/resources/application.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ server:
3333

3434
# mybatis配置
3535
mybatis:
36-
config-location: classpath:mybatis-config.xml
36+
# 配置映射类所在包名
37+
type-aliases-package: com.wooyoo.learning.dao.domain
38+
# 配置mapper xml文件所在路径,这里是一个数组
39+
mapper-locations:
40+
- mappers/ProductMapper.xml
41+
3742

3843
logging:
3944
level:

src/main/resources/mybatis-config.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)