SpringBoot整合mybatis例子(*mapper.xml方式)、postman测试
1) 用idea创建springboot项目,勾选必要插件,完成项目创建
2) 创建表account
3) 创建实体类Account
4) 创建映射AccountMapper.xml文件
5) 创建mapper代理dao
6) 创建controller
7) 在主程序中添加@MapperScan扫描组件
8) 在application.properties中配置mysql数据源和mybatis映射xml文件路径
9) 项目结构
10) postman测试