idea 安装 Free MyBatis plugin
下图 about intellij idea可以查看自己idea的版本
安装点击:preferences-》plugins-》installplugin from disk
点击installplugin from disk选中自己下载的Free MyBatis plugin安装
我使用的是方法二: 自助构建
参考示例:
生成的代码
其余就改动了三个地方。
application.yml
server:
port: 7788
spring:
datasource:
# 如果用错数据库 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): mapper.com.example.mapper.EmployDao.selectByPrimaryKey
# url: jdbc:mysql://10.0.1.25:3306/test?characterEncoding=utf8
#username: root
#password: 123456
url: jdbc:mysql://localhost:3306/test?characterEncoding=utf8
username: manager
pas