1、可参考连接:https://www.cnblogs.com/thomas12112406/p/6217211.html
2、dao层的配置
void addUser(@Param("uname") String uname,
@Param("phone") String phone,
@Param("address") String address,
@Param("header") String header,
@Param("motto") String motto,
@Param("nickname") String nickname,
@Param("hobbies") String hobbies);
3、mybatis插入语法结构
<insert id="addUser" parameterType="User" useGeneratedKeys="true">
insert into userinfo (uname, phone, address, header, motto, nickname, hobbies) values (#{uname}, #{phone}, #{address}, #{header}, #{motto}, #{nickname}, #{hobbies})
</insert>