is not writable or has an invalid setter method错误的解决
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错误的解决的更多相关文章
- 错误:Bean property 'sessionFactory' is not writable or has an invalid setter method.
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' ...
- 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 ...
- 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 ...
- Spring整合Hibernate报错:annotatedClasses is not writable or has an invalid setter method
Spring 整合Hibernate时报错: org.springframework.beans.factory.BeanCreationException: Error creating bean ...
- Bean property '**DAO' is not writable or has an invalid setter method
ApplicationContext.xml中配置有问题,里面的bean的属性名称写错了. ApplicationContext.xml中写的是loginDAO,在java类里配置的bean却写成了l ...
- Bean property XX' is not writable or has an invalid setter method
刚刚搞spring.property注入时遇到这个问题,百度一下.非常多人说是命名或者get set方法不一致的问题,可是这个我是知道的.写的时候也注意到这些.所以应该不是这个问题.以为是xml头写的 ...
- error: Bean property 'userDAO' is not writable or has an invalid setter method.
使用Spring属性注入的方式,没有在ServiceImpl中setDao,导致程序报错 public class AddressServiceImpl implements IAddressServ ...
- Oracle客户端工具出现“Cannot access NLS data files or invalid environment specified”错误的解决办法
Oracle客户端工具出现"Cannot access NLS data files or invalid environment specified"错误的解决办法 方法一:参考 ...
- Xmind在win10更改用户设置后出现Invalid Configuration Location 错误的解决办法
错误原因: 因为一开始新建win10用户时,使用的是中文用户名,导致了部分软件比如IDEA读取C盘中配置文件时报错.我用管理员权限修改用户姓名为英文后,IDEA的问题虽然已经解决,但Xmind却报出了 ...
随机推荐
- 本地IP,掩码,网关,DNS设置
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- Delphi获取本机的MAC地址
Delphi获取本机的MAC地址: uses NB30; function GetAdaPterInfo(lana: Char): string; var Adapter: TAdapterS ...
- Markdown画各种图表
并不是所有编辑器都支持,比如博客园这个就不支持... 流程图 st=>start: 开始 op=>operation: 首先按个按钮 op2=>operation: 那你从头开始吧 ...
- openstack cpu pinning
为了减少CPU竞争,提高CPU cache命中率,可以把guest的vcpu pin到host的物理CPU上. 在openstack中,可以添加以下到flavor extra specs: hw:cp ...
- Android WebView无法播放视频或直播,关闭界面后任在播放的问题;
1.设置webview属性: webView.setWebChromeClient(new MyWebChromeClient()); webSettings = webView.ge ...
- IE兼容性问题的总结
一.IE6/IE7对display:inline-block的支持欠缺 1.表现描述 这个应该算是很经典的ie兼容性问题了,inline-block作用就是将块级元素以行的等式显示.在主流浏览器中水平 ...
- Heap Dump (heap=dump)
Heap Dump (heap=dump) 转储堆内容使用heap=dump选项.可以是ASCII或者是二进制格式,根据设定的格式,jhat解析二进制格式.format=b. 如果指定格式是二进制,转 ...
- maven包下载失败
使用文件搜索工具(楼主用的是 Everything) 输入.lastupdate删除所有以.lastupdate结尾的文件.然后简单修改.pom(比如加空格) 保存,然后eclipse就会重新下载ja ...
- Implement a deployment tool such as Ansible, Chef, Puppet, or Salt to automate deployment and management of the production environment
Implement a deployment tool such as Ansible, Chef, Puppet, or Salt to automate deployment and manage ...
- IntelliJ IDEA 快捷键积累
Windows idea 平时常用快捷键 一.视图查看 Ctrl+F12 查看file,method结构图.类继承机构图(方法,参数,返回值) Ctrl+shift+Al ...