2017-08-17 21:18:39,102 WARN [org.springframework.context.support.ClassPathXmlApplicationContext]
- Exception encountered during context initialization
- cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException
:Error creating bean with name 'CustomerBean' defined in class path resource [applicationContext.xml]
: Error setting property values;
nested exception is org.springframework.beans.NotWritablePropertyException
: Invalid property 'lists' of bean class [com.yiibai.common.Customer]:
Bean property 'lists' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Spring使用setters和getters来进行依赖注入,这里没有提供getters和setter方法。在类的定义里面提供get set方法就行了。