No setter found for property 'userDAO' in class 'com.ssh.service.impl.User1Service'
造成此问题的原因是: 在applicationContext.xml中引用
<bean id="userService" class="com.ssh.service.impl.User1Service">
<property name="user1DAO">
<ref bean="User1DAO" />
</property>
</bean>
但是在User1Service中没有定义 成员变量的属性
private User1DAO user1DAO;
public User1DAO getUser1DAO() {
return user1DAO;
}
public void setUser1DAO(User1DAO user1dao) {
user1DAO = user1dao;
}
这样就可以了
No setter found for property 'userDAO' in class 'com.ssh.service.impl.User1Service'的更多相关文章
- ERROR: HHH000123: IllegalArgumentException in class: com.tt.hibernate.helloworld.News, setter method of property: date
问题描述: Hibernate连接数据库时,报出如下错误: 十一月 29, 2016 3:08:31 下午 org.hibernate.tool.hbm2ddl.SchemaUpdate execut ...
- error: Bean property 'userDAO' is not writable or has an invalid setter method.
使用Spring属性注入的方式,没有在ServiceImpl中setDao,导致程序报错 public class AddressServiceImpl implements IAddressServ ...
- python3 的setter方法及property修饰
#!/usr/bin/env pthon#coding:utf-8 class person(object): def __init__(self,name,sex,age,surface,heigh ...
- No setter found for property 'cronExpression' in class 'org.springframework.scheduling.quartz.CronTriggerBean'
今天想写个Spring集成Quartz的小Demo,结果报错cronExpression未定义,通过差错,原来是因为Spring 3.0.5与Quartz2.2.2不兼容,Spring3.1以下的只能 ...
- spring入门教程——笔记
Spring学习笔记(1)----简单的实例 --------------------------------- 首先需要准备Spring包,可从官方网站上下载. 下载解压后,必须的两个包是s ...
- spring NotWritablePropertyException异常
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'userDao' of bea ...
- JAVAWEB 一一 框架整合(SSH,Spring+Struts2+Hibernate IOC/DI AOP声明式事务处理 定时任务)
package org.springframework.orm.hibernate3; import java.io.Serializable; import java.util.List; impo ...
- 不错的Spring学习笔记(转)
Spring学习笔记(1)----简单的实例 --------------------------------- 首先需要准备Spring包,可从官方网站上下载. 下载解压后,必须的两个包是s ...
- EXCEPTION-javaBean
CreateTime--2016年11月24日14:29:43Author:Marydon 声明:异常类文章主要是记录了我遇到的异常信息及解决方案,解决方案大部分都是百度解决的,(这里只是针对我遇 ...
随机推荐
- $.extend(),与$.fn.extend() 讲解
$.extend(),与$.fn.extend() 讲解(一) (2013-07-11 10:24:31) 转载▼ 转自:http://blog.sina.com.cn/s/blog_a3bd3bd0 ...
- POJ 3254 Corn Fields(DP + 状态压缩)
题目链接:http://poj.org/problem?id=3254 题目大意:Farmer John 放牧cow,有些草地上的草是不能吃的,用0表示,然后规定两头牛不能相邻放牧.问你有多少种放牧方 ...
- (hdu)1160 FatMouse's Speed
Problem Description FatMouse believes that the fatter a mouse is, the faster it runs. To disprove th ...
- 【转】JSON简介以及用法代码汇总
什么是JSON? JavaScript 对象表示法(JavaScript Object Notation). JSON是一种轻量级的数据交换格式,某个JSON格式的文件内部譬如可以长成这样: { &q ...
- fstat().stat()函数
int stat(const char *path, struct stat *buf); int fstat(int fd, struct stat *buf); 唯一不同是参数不同,其他一样. 文 ...
- Vcl.FileCtrl.SelectDirectory
描述:显示一个目录的对话框(属于Delphi) function SelectDirectory(var Directory: string; Options: TSelectDirOpts; Hel ...
- C#读取带命名空间的xml,xaml文件的解决方案
使用C#读取xml文件有三种常用的方式: 1.xmlDocument 2.XmlTextReader 3.Linq To Xml 但是这些方式在读写有些带命名空间的xml时就不知道怎么办了(例如把xa ...
- ASP.NET 共用类库
using System; using System.Collections.Generic; using System.Text; using System.Web; using System.We ...
- mvc4 membership, [Win32Exception (0x80004005): The system cannot find the file specified]
public class UsersContext : DbContext { public UsersContext() : base("conn1") //change the ...
- MOSFET管应用总结
/* *本文转载自互联网,仅供个人学习之用,请勿用于商业用途. */ 在使用MOS管设计开关电源或者马达驱动电路的时候,大部分人都会考虑MOS的导通电阻,最大电压等,最大电流等,也有很多人仅仅考虑这些 ...