springboot+mybatis快速上手
1、配置实体类,实体属性名称与数据库中字段名对应,不对应的话也可以在xml中配置
public class IUser {
private String id;
private String userNick;
private String userPhone;
private String userIdcard;
private String schoolName;
private String userType;
}
//省略get set
2、yml文件配置连接池和Mapper地址
server:
port: 8082
spring:
datasource:
driver