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却报出了 ...
随机推荐
- Python的dict与set
一.dict 其他语言中也称为map,使用键-值(key-value)存储 特点: 具有极快的查找速度:可以直接由key计算出value所在的内存地址,而list采用搜索的方式:dict付出的代价是内 ...
- Spark SQL快速离线数据分析
拷贝hive-site.xml到spark的conf目录下面 打开spark的conf目录下的hive-site.xml文件 加上这段配置(我这里三个节点的spark都这样配置) 把hive中的mys ...
- 造excel表格横、列数据每一格自动累加填充效果
1.需求 excel每个横格子和竖格子number数据不一致的情况,保持如下金额字段每次自动累加 2.步骤: 1)设置excel格子为number格式(可以不要小数) 2)选中需要增序的单元格,选择e ...
- linux rabbitmq 远程登录
./rabbitmqctl add_user admin1 admin1 ./rabbitmqctl set_user_tags admin1 administrator ./rabbitmqctl ...
- StanFord ML 笔记 第八部分
第八部分内容: 1.正则化Regularization 2.在线学习(Online Learning) 3.ML 经验 1.正则化Regularization 1.1通俗解释 引用知乎作者:刑无刀 ...
- Oracle多行记录合并/连接/聚合字符串的几种方法
怎么合并多行记录的字符串,一直是oracle新手喜欢问的SQL问题之一,关于这个问题的帖子我看过不下30个了,现在就对这个问题,进行一个总结. 什么是合并多行字符串(连接字符串)呢,例如:SQL& ...
- raw格式和qcow2格式
Raw: "raw" 镜像格式是最最简单的,并且是被 KVM 和 Xen 原生支持的格式,你 可以想象裸格式镜像和块设备文件是二进制位相当的,就好像从块设备拷 贝过来的,比方说,使 ...
- 57.纯 CSS 创作一双黑暗中的眼睛
原文地址:https://segmentfault.com/a/1190000015327725 感想:原来边框还能这样玩-->做会眨眼的眼睛 HTML code: <div class= ...
- 2.3在LeetCode中使用我们自定义的类
在上一节中我们使用的是java提供了的类,这一小节中我们就来学习一下如何在LeetCode中使用我们自定义的类. 其实很简单,我们只需把我们编写的自定义类,拷贝到LeetCode提供的类中,形成类中类 ...
- Flex自定义组件、皮肤,并调用
标签:Flex 自定义组件 自定义皮肤 主应用调用模块 本程序样例学习自flex 实战教程.但因原教程代码不全,且根据个人需求有更改. 1文件列表 自定义as类Reveal.as,该类实现组件的 ...