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. sublime格式化js、css、html的通用插件-html js css pretty

    sublime格式化js.css.html的通用插件-html js css pretty: 这个插件可以格式化基本上所有js html css文件,包括写在html中的js代码 ,可以在packag ...

  2. SQL SERVER 数据压缩

    从SQL SERVER 2008开始,SQL SERVER 提供了对数据进行压缩的功能,启用数据压缩无须修改应用程序. 数据压缩可有效减少数据的占用空间,读取和写入相同数据花费的IO也响应减少,从而可 ...

  3. win10图片打开方式里没有默认照片查看器的解决方法

    今天安装好win10后发现打开图片的默认程序是win10自带的画图工具,非常不方便,并且右键选择打开方式里边也找不到默认的“照片查看器”.百度搜索了一下关于win10打开方式恢复默认照片查看器的方法, ...

  4. Pyhton-Web框架之【Django】

    一.什么是web框架 框架,即framework,特指为解决一个开放性问题而设计的具有一定约束性的支撑结构,使用框架可以帮你快速开发特定的系统,简单地说,就是你用别人搭建好的舞台来做表演. 对于所有的 ...

  5. linux学习思维导图(转)

    转自:https://blog.csdn.net/m1585761297/article/details/80017111 先附上一张学习路径的导图 导图一 导图二(一套) 1.Linux目录结构 2 ...

  6. [Unity优化]UI优化(一):RaycastTarget

    参考链接: http://www.manew.com/thread-100366-1-1.html https://www.jianshu.com/p/3082ebf8a342 https://blo ...

  7. CMD下的netstat命令

    查询端口启用情况 netstat -ano|findstr 80

  8. 23.模拟登录cookies请求速询网站数据

    采集速询网站数据: 网站地址:http://www.suxun0752.com/index.html 网站是需要账号登录才给返回信息的,我这里是直接拿的登录后的cookies请求的数据,cookies ...

  9. 《算法》第四章部分程序 part 7

    ▶ 书中第四章部分程序,包括在加上自己补充的代码,图中找欧拉环 ● 无向图中寻找欧拉环 package package01; import edu.princeton.cs.algs4.StdOut; ...

  10. ScheduledThreadPoolExecutor 使用线程池执行定时任务

    转自:https://segmentfault.com/a/1190000008038848 在现实世界里,我们总是免不了要定期去做一件事情(比如上课)—— 在计算机的世界里,更是如此.比如我们手机每 ...