造成此问题的原因是: 在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;
}

这样就可以了

04-15 00:01