报错代码:Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'car' of bean class [com.yunyi.entity.Person]: Bean property 'car' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
翻译:Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'car' of bean class [com.yunyi.entity.Person]: Bean property 'car' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
解决办法:检查applicationContext.xml中<bean>中对应的类是否设置set和get方法。