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却报出了 ...
随机推荐
- 第9章 应用层(5)_文件传输协议FTP
6. 文件传输协议FTP 6.1 FTP主动和被动模式 (1)FTP协议 ①与其他协议不同,FTP协议在客户端访问FTP服务器时需要建立两个TCP连接.一个用来传输FTP命令,一个用来传输数据. ②在 ...
- SQLite3数据库
#SQLite可视化管理工具(SQLite Expert Pro) SQLite特点: 1. 遵守ACID(原子性.一致性.隔离性和持久性)的关系型数据库管理系统:2. 不是一个C/S结构的数据库引擎 ...
- 阿里云发送短信验证码php_SDK
1.登录阿里云账号下载——aliyun-dysms-php-sdk(我使用的php版本) 下载地址:https://help.aliyun.com/document_detail/55359.html ...
- linux进程端口防火墙
进程端口: 1.netstat –apn :查看所有的进程和端口使用情况 2.查看8080端口是否被占用 [root@localhost bin]# lsof -i:8080 3.查看防火墙开放的端口 ...
- 零基础学习python_easygui(35课)
今天学习的内容我觉得还是很有意思的,当然我主要也是从这个网址学的:http://bbs.fishc.com/thread-46069-1-1.html,大家可以直接看这个网址进行学习,当然也可以看看我 ...
- 网易云音乐mp3外链、真实地址下载方法
一个网易音乐外链地址长期有效,很简单的方法: 第一步打开网易云音乐,随便找到一首歌,播放,复制网址的ID, 例如:杨钰莹的心雨,网址是: http://music.163.com/#/song?id= ...
- php学习笔记1——使用phpStudy进行php运行环境搭建与测试。
1. 新手第一步还是使用phpStudy搭建一下windows下的php环境,并测试.如下: http://jingyan.baidu.com/article/3c343ff7067eff0d3679 ...
- <转载> GIT 操作小结 http://www.cnblogs.com/-ding/p/6008096.html
参考: http://www.cnblogs.com/zyf-zhaoyafei/p/4486220.html 作者:万境绝尘 转载请注明出处:http://blog.csdn.net/shulian ...
- 简单ATM机功能实现及感想
感想: 在那一天下午气喘吁吁的上了六楼 在建民的课上 都要带电脑 第一次上这样的课,每一次都是个段子 ,这一次考试是学前考试,什么也不知道 ,但是通过百度, 发现JAVA有很多还都和C语言相似的地方 ...
- Android权限管理
使用系统权限 为了保护系统的完整性和用户隐私权,Android 在访问受限的沙盒中运行每款应用.如果应用需要使用其沙盒以外的资源或信息,则必须明确请求权限.根据应用请求的权限类型,系统可能会自动授予权 ...