2、public void setShowCode(boolean isShowCode) { 9. this.isShowCode = isShowCode; 10.} spring在给javabean设置值的时候,抛出异常:1.Caused by: org.springframework.beans.NotWritablePropertyException: 2.Invalid property 'isShowCode' of bean class [com.codemouse.beans.Country]: 3.Bean property 'isShowCode' is not
3、 writable or has an invalid setter method. 4.Did you mean 'showCode'? 5.at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1064) 代码运行环境:jdk1.6+eclipse3.2+spring3.1,本文下面的代码都在该环境下测试。原因跟踪分析:跟踪Spring源码,可以看到下面这段代码:1.private CachedIntrospectionResults(Class beanClass, 2