Spring boot+Vue全栈开发---整合Mybatis进行数据持久化

1. 创建项目,添加mybatis,web,mysql连接,druid数据库连接池依赖


2.配置数据库连接信息


3. 创建实体类


4.创建Mapper层


5.创建映射文件Mapper.xml

Mapper的xml文件与mapper接口对应


6. 创建Service层,调用Mapper接口方法实现数据存储

 


7. 创建Controller层调用Service层


8.  配置pom.xml文件

 


猜你喜欢

转载自blog.csdn.net/Day_and_Night_2017/article/details/89453357