您的位置:首页 > 运维架构

SSH框架 Bean property * is not writable or has an invalid setter method错误分析与解决方法

2020-02-02 13:06 901 查看

原文链接:https://blog.csdn.net/naughty610/article/details/5619092

错误出现提示:

org.springframework.beans.NotWritablePropertyExcep tion:Bean property ‘SysUserService’ is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?

错误分析 :

根据org.springframework.beans.NotWritablePropertyExcep tion 初步分析是spring配置文件中配置问题 或配置文件中某个地方写的不对。

出错地点(红色标注为为导致出错的地方):

而 java类中我写set方法中是这么写的

public class SysUserService {
private SysUserDao sysuserdao;

public void setSysuserdao(SysUserDao sysuserdao ) {
this.sysuserdao = sysuserdao;
}
}

set 中的属性sysuserdao 和 property name="SysUserDao " 写的不一致

解决方法:

将修改成和set一致 即可。

  • 点赞
  • 收藏
  • 分享
  • 文章举报
敲出一片天 发布了18 篇原创文章 · 获赞 2 · 访问量 716 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐