java中在配置spring时,遇到is not writable or has an invalid setter method的错误一般是命名方式的问题

需要写成private userInfoDao userinfoDao;(这里前面是小写,后面是大写)

在get和set方法中,需要写成这样get 或set之后只能有两个字母大写

private userInfoDao userinfoDao;

public userInfoDao getUserinfoDao(){
return userinfoDao;
}

public void setUserinfoDao(userInfoDao userinfoDao){
this.userinfoDao=userinfoDao;
}

配置文件

<bean id="userinfoImp" class="com.power.daoImp.UserInfoDaoImp">
<property name="userinfoDao" ref="userinfoDao"></property>
</bean>

property中必须要在UserInfoDaoImp类中,需要get或set方法。

is not writable or has an invalid setter method错误的解决的更多相关文章

  1. 错误:Bean property 'sessionFactory' is not writable or has an invalid setter method.

    Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' ...

  2. org.springframework.beans.NotWritablePropertyException:Bean property 'xxxService' is not writable or has an invalid setter method.

    完整报错提示信息:Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'blogDe ...

  3. Bean property ‘mapperHelper’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    spring boot 报错: Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property ...

  4. Spring整合Hibernate报错:annotatedClasses is not writable or has an invalid setter method

    Spring 整合Hibernate时报错: org.springframework.beans.factory.BeanCreationException: Error creating bean ...

  5. Bean property '**DAO' is not writable or has an invalid setter method

    ApplicationContext.xml中配置有问题,里面的bean的属性名称写错了. ApplicationContext.xml中写的是loginDAO,在java类里配置的bean却写成了l ...

  6. Bean property XX&#39; is not writable or has an invalid setter method

    刚刚搞spring.property注入时遇到这个问题,百度一下.非常多人说是命名或者get set方法不一致的问题,可是这个我是知道的.写的时候也注意到这些.所以应该不是这个问题.以为是xml头写的 ...

  7. error: Bean property 'userDAO' is not writable or has an invalid setter method.

    使用Spring属性注入的方式,没有在ServiceImpl中setDao,导致程序报错 public class AddressServiceImpl implements IAddressServ ...

  8. Oracle客户端工具出现“Cannot access NLS data files or invalid environment specified”错误的解决办法

    Oracle客户端工具出现"Cannot access NLS data files or invalid environment specified"错误的解决办法 方法一:参考 ...

  9. Xmind在win10更改用户设置后出现Invalid Configuration Location 错误的解决办法

    错误原因: 因为一开始新建win10用户时,使用的是中文用户名,导致了部分软件比如IDEA读取C盘中配置文件时报错.我用管理员权限修改用户姓名为英文后,IDEA的问题虽然已经解决,但Xmind却报出了 ...

随机推荐

  1. SerializeHelper

    using System; using System.Collections.Generic; using System.Configuration; using System.IO; using S ...

  2. HBase数据模型和读写原理

    Hbase的数据模型和读写原理: ​ HBase是一个开源可伸缩的分布式数据库,他根据Google Bigtable数据模型构建在hadoop的hdfs存储系统之上. ​ HBase是一个稀疏.多维度 ...

  3. 打jar包的几种方式

    测试用类public class Hello {    public static void main(String[] args) {        System.out.println(" ...

  4. ubantu 操作

    应用程序启动器“monodevelop.desktop”还没有被标记为可信任的. 于是在网上查询解决方案,在ubuntu中文论坛找到一个帖子提到这个问题的解决方法,尝试之解决. 帖子地址:http:/ ...

  5. mke2fs

    mke2fs - create an ext2/ext3/ext4 filesystem # mke2fs -b -c -N -t ext4 /dev/sdb #(注意末尾是/dev/sdb....? ...

  6. IDEA下载Git中项目

     一.             打开idea,点击File>Settings,搜索git(安装系统默认设置即可) 二.        选择git 三.        Git中项目的路径粘贴到ID ...

  7. ios判断当前设备类型

    代码如下: + (NSString*) deviceString { // 需要#import "sys/utsname.h" struct utsname systemInfo; ...

  8. 关于thinkphp中post提交空白的思考

    关于thinkphp中post提交空白的思考 首选检查 目标路径是否存在 如果目标URL不存在 那肯定是空 如果提交的路径存储  TP这种完善的系统肯定会提示 各种报错了

  9. 27.纯 CSS 创作一个精彩的彩虹 loading 特效

    原文地址:https://segmentfault.com/a/1190000014939781 感想:正方形->圆->旋转一定角度->动画->隐藏下一半 HTML代码: &l ...

  10. WebForm(Application,ViewState,Repeater的Command操作)

    一.AppliCation: 1.存储在服务器端,占用服务器内存 2.生命周期:永久 3.所有人都可访问的共有对象,一般用作服务器缓存 4.赋值:Application["key" ...