springboot集成mybatis操作MySQL踩坑记录(长期更新)
springboot使用mybatis操作MySQL数据库有注解和xml配置文件两种方式,xml配置文件的方式可能会有比较多的坑。这里记录一下:
1、和springmvc不同,springboot配置文件中的classpath是指项目中的resource目录,如mybatis.mapper-locations=classpath:mapper/*Mapper.xml;
2、写查询语句时,res...
原创
2020-02-25 19:30:56 ·
671 阅读 ·
0 评论