Bean property XX' is not writable or has an invalid setter method
2017-05-14 13:46
597 查看
刚刚搞spring。property注入时遇到这个问题,百度一下。非常多人说是命名或者get set方法不一致的问题,可是这个我是知道的。写的时候也注意到这些。所以应该不是这个问题。以为是xml头写的问题。可是换了几个都不行。
后来灵机一动。会不会是变量设置成静态的原因。试着把静态去了。一搞。ok了。
总结。get方法是不能静态的,变量和set是能够的。
后来灵机一动。会不会是变量设置成静态的原因。试着把静态去了。一搞。ok了。
总结。get方法是不能静态的,变量和set是能够的。
相关文章推荐
- Bean property XX' is not writable or has an invalid setter method
- 错误信息:Bean property 'sessionFactory' is not writable or has an invalid setter method.
- Spring配置文件加载时出现Bean property 'newscontentDAO' is not writable or has an invalid setter method错误的解决[00原创]
- Bean property 'loginDAO' is not writable or has an invalid setter method
- Bean property 'annotatedClasses' is not writable or has an invalid setter method
- Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of t
- Bean property 'productService' is not writable or has an invalid setter method. Does the parameter t
- Spring配置文件加载时出现Bean property 'newscontentDAO' is not writable or has an invalid setter method错误的解决
- Bean property 'xxx' is not writable or has an invalid setter method
- Bean property 'xxx' is not writable or has an invalid setter method
- Bean property 'service' is not writable or has an invalid setter method. Did you mean 'serivce'?
- Bean property 'esyerDao' is not writable or has an invalid setter method. Does the parameter type of
- Bean property 'xxDao' is not writable or has an invalid setter method
- Spring 配置文件报错:Bean property 'xxx' is not writable or has an invalid setter method
- 解决Bean property ** is not writable or has an invalid setter method
- Bean property 'adminService' is not writable or has an invalid setter method
- Bean property 'sessionFactory' is not writable or has an invalid setter method
- Bean property 'manualPaperService' is not writable or has an invalid setter method. Did you mean 'ma
- dubbo-admin-2.5.3 运行报错: Bean property 'URIType' is not writable or has an invalid,uritypewritable
- Bean property 'interceptorDao' is not writable or has an invalid setter method. Did you mean 'interc