Spring 可以这样配置吗?


附件中是我的spring配置文件中的一部分,,,userdao是接口iuserdao的实现类,
UserBusiness中的property是接口iuserdao,不知是否可以这样配,,
但我运行时总要出错,说不匹配...
报错如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userbusiness' defined in class path resource [appcontext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'iuserdao' of bean class [com.hyintro.register.business.UserBusiness]: Bean property 'iuserdao' is not writable or has an invalid setter method: Does the parameter type of the setter match the return type of the getter?

请各位师兄给小弟赐教...小弟先谢了...
laxxx334861437a5.txt

问题可能是你写的实现类中对property对象添加的get 和 set方法不准备(和准备的命名不一致)或者是配制文件中把类名写错了。

问题可能是你写的实现类中对property对象添加的get 和 set方法不准备(和标准的命名不一致)或者是配制文件中把类名写错了。