springboot中mybatis的配置是相对简单的,只需要简单几步就可以了
1.先在springboot的application.property中配置相应属性

2.在static目录下引入mybatis配置,在static下新建spring-mybatis.xml文件

3.在启动类上设置扫描dao包,springboot会自动去扫描数据库接口所在的dao包,使mapper与对应的接口所在的类一一对应

本文标题:springboot +mybatis之mybatis配置
本文链接:https://www.haomeiwen.com/subject/qmzqictx.html
网友评论