SpringBoot整合MyBatis

https://img-blog.csdnimg.cn/20181229104707637

SpringBoot微服务整合MyBatis完成CRUD

SpringBoot微服务整合MyBatis完成员工的CRUD

​​​创建springboot项目

需要导入以下插件

Web cache mybatis mysql

 


整体项目结构

https://img-blog.csdnimg.cn/20181229104707679


实体类

https://img-blog.csdnimg.cn/20181229104707734

https://img-blog.csdnimg.cn/20181229104707777


mapper​

https://img-blog.csdnimg.cn/20181229104707814


service​

https://img-blog.csdnimg.cn/20181229104707866


controller​

https://img-blog.csdnimg.cn/20181229104707919


配置文件

https://img-blog.csdnimg.cn/20181229104707964


主运行

https://img-blog.csdnimg.cn/2018122910470814


运行结果

https://img-blog.csdnimg.cn/2018122910470865

https://img-blog.csdnimg.cn/20181229104708115

​​​​​

 

原文地址:https://www.cnblogs.com/chengxiaolong/p/10206329.html