Mybatis异常收集
程序员文章站
2022-07-14 11:03:35
...
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'surveyAdminExpandVo' in 'class com.survey.toysrus.model.SurveyAdminExpandVo'
其实这种错误很明显:异常已经告诉我们字段 surveyAdminExpandVo 不再 SurveyAdminExpandVo类中
在看到我的配置文件:
<mapper namespace="com.survey.toysrus.dao.SurveyAdminExpandMapper">
<insert id="insert" parameterType="SurveyAdminExpandVo">
INSERT INTO survey_admin VALUES(NULL,
<if test="surveyAdminExpandVo != null">
<if test="surveyAdminExpand.adminname !=null and surveyAdminExpand.adminname !=''">
'${surveyAdminExpand.adminname}',
</if>
<if test="surveyAdminExpand.password !=null and surveyAdminExpand.password !=''">
'${surveyAdminExpand.password}',
</if>
NOW(),NOW())
</if>
</insert>
</mapper>
surveyAdminExpandVo
实体类
public class SurveyAdminExpandVo {
private SurveyAdmin surveyAdmin;
private SurveyAdminExpand surveyAdminExpand;
public SurveyAdmin getSurveyAdmin() {
return surveyAdmin;
}
public void setSurveyAdmin(SurveyAdmin surveyAdmin) {
this.surveyAdmin = surveyAdmin;
}
public SurveyAdminExpand getSurveyAdminExpand() {
return surveyAdminExpand;
}
public void setSurveyAdminExpand(SurveyAdminExpand surveyAdminExpand) {
this.surveyAdminExpand = surveyAdminExpand;
}
}
上一篇: jsonp跨域请求域名白名单设置
下一篇: zk白名单设置python脚本