`
scorpiomiracle
  • 浏览: 263493 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

spring 报错 NotWritablePropertyException的原因

阅读更多
  SSH项目出现类似如下报错:
  org.springframework.beans.NotWritablePropertyException: Invalid property '***' of bean class [***.***.***]: Bean property '***' is not writable or has an invalid setter method: ………………?

  上面的报错可能有两个原因:
  1.把那个 Invalid property 的属性名 '***' 修改一下,因为可能不符合规范,尽量避免属性名中有多个大写字母,网上也有很多即是此法解决。
  2.在依赖注入时,如果对某类注入了属性,那么必须在该类中书写该属性,并生成getter、setter方法,我就是因急于测试,只想输出个字符串,所以连那个属性都没有声明,更别说生成getter、setter方法了,呵呵。
  如果既有了属性名,又生成了getter、setter方法,还有这个报错,那么麻烦你仔细检查一下你的配置代码了,肯定书写有误。
分享到:
评论

相关推荐

    Dubbo管理控制台(兼容JDK8)

    Dubbo管理控制台(兼容JDK8)

    Spring入门十大问题

    - **NotWritablePropertyException**:当Spring容器尝试为Bean设置属性值,但该属性不存在或无法写入时抛出此异常。 - **常见原因**: - Bean类没有相应的setter方法。 - 属性名拼写错误。 - **解决方案**: - ...

    org.springframework.web.servlet-3.0.1.RELEASE-A.jar

    nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'error_view' of bean class [com.demo.controller.action.AuthorAction]: Bean property 'error_view' is not ...

    org.springframework.transaction-3.1.2.RELEASE.zip

    nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'transactionManagerBeanName' of bean class [org.springframework.transaction.interceptor....

    spring常见错误

    nested exception is org.springframework.beans.NotWritablePropertyException` 此类错误通常发生在尝试设置一个不可写的属性值时。具体而言,当Spring容器试图通过setter方法将一个bean注入到另一个bean中时,...

    SPRING API 2.0.CHM

    NotWritablePropertyException NullSafeComparator NullSourceExtractor NullValueInNestedPathException NumberUtils ObjectError ObjectFactory ObjectFactoryCreatingFactoryBean ObjectNameManager ...

    dubbo-admin 管理后台2.5.4 for JDK8

    大家可以直接使用 Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property ...

    支持jdk8版本dubbo-admin

    org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable ...

    dubbo_admin-2.54.war和dubbo_admin_2.54forJDK8

    org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable ...

    Dubbo管理控制台dubbo admin2.X for jdk8 (window,liunx)

    如果是在JDK8下跑,会报错: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean ...

    dubbo-admin-2.5.8.war(编译环境JDK8)

    org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or...

Global site tag (gtag.js) - Google Analytics