springboot mybatis plus 自定义sql

有两种方式:
在这里插入图片描述
这个是使用注解

第二种:
写mapper文件
在这里插入图片描述
最好是在dao包中写入xml文件在这里插入图片描述
如果不在dao包的话,就要用locations来标明
如果是idea,要先让idea能够识别xml文件,我的另一个文章里有

官方文档:
https://baomidou.gitee.io/mybatis-plus-doc/#/spring-boot

发布了34 篇原创文章 · 获赞 0 · 访问量 626

猜你喜欢

转载自blog.csdn.net/weixin_44841849/article/details/104281026