• 完整报错提示信息:Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'blogDetailsService' of bean class [com.blog.action.BlogDetailsAction]: Bean property 'blogDetailsService' is not writable or has an invalid setter method. Did you mean 'blogDetailService'?
  • 解决方案:
  1. 保证applicationContext.xml中注入的属性名称与com.blog.action.BlogDetailsAction中属性名称相同

    1.1 applicationContext.xml:

<bean name="blogDetailsActionBean" class="com.blog.action.BlogDetailsAction">
<property name="blogDetailsService" ref="blogDetailsServiceImpl" />
</bean>

   1.2 BlogDetailsAction.java

BlogDetailsService blogDetailsService;
public BlogDetailsService getBlogDetailsService() {
return blogDetailsService;
} public void setBlogDetailService(BlogDetailsService blogDetailsService) {
this.blogDetailsService = blogDetailsService;
}

  注:一般来说这样就可以解决问题了,但我这里不知道为什么必须将blogDetailsService全部都改成blogDetailService才可以运行。

  原因:修改的struts.xml未生效。重开工作空间解决。

     

  

org.springframework.beans.NotWritablePropertyException:Bean property 'xxxService' is not writable or has an invalid setter method.的更多相关文章

  1. 错误:Bean property 'sessionFactory' is not writable or has an invalid setter method.

    Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' ...

  2. Bean property ‘mapperHelper’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    spring boot 报错: Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property ...

  3. Bean property '**DAO' is not writable or has an invalid setter method

    ApplicationContext.xml中配置有问题,里面的bean的属性名称写错了. ApplicationContext.xml中写的是loginDAO,在java类里配置的bean却写成了l ...

  4. error: Bean property 'userDAO' is not writable or has an invalid setter method.

    使用Spring属性注入的方式,没有在ServiceImpl中setDao,导致程序报错 public class AddressServiceImpl implements IAddressServ ...

  5. Bean property 'transactionManagerBeanName' is not writable or has an invalid set

    [2017-02-07 11:38:48,458]-[localhost-startStop-1]-[org.springframework.beans.factory.support.Default ...

  6. dubbo-admin-2.5.3 运行报错: Bean property 'URIType' is not writable or has an invalid 解决方法

    因为 jdk 是1.8的版本,和 dubbo-admin 存在兼容性问题.所以报错: Bean property 'URIType' is not writable or has an invalid ...

  7. Bean property XX&#39; is not writable or has an invalid setter method

    刚刚搞spring.property注入时遇到这个问题,百度一下.非常多人说是命名或者get set方法不一致的问题,可是这个我是知道的.写的时候也注意到这些.所以应该不是这个问题.以为是xml头写的 ...

  8. Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]

    linux中的JDK为JDK8,tomcat为tomcat8 加入dubbo.war包 启动报错! Caused by: org.springframework.beans.factory.BeanC ...

  9. Caused by: org.springframework.beans.NotWritablePropertyException

    1.错误叙述性说明 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -h ...

随机推荐

  1. Loj #2529. 「ZJOI2018」胖

    Loj #2529. 「ZJOI2018」胖 题目描述 Cedyks 是九条可怜的好朋友(可能这场比赛公开以后就不是了),也是这题的主人公. Cedyks 是一个富有的男孩子.他住在著名的 The P ...

  2. Pandas中查看列中数据的种类及个数

    Pandas中查看列中数据的种类及个数 读取数据 import pandas as pd import numpy as np filepath = 'your_file_path.csv' data ...

  3. centos7 安装docker(手动和脚本安装)换源 卸载

    centos7 安装docker(手动和脚本安装)换源 卸载 Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的CentOS 版本是否支持 Docker ...

  4. c++小学期大作业攻略(一)环境配置

    UPDATE at 2019/07/20 20:21 更新了Qt连接mysql的方法,但是是自己仿照连VS的方法摸索出来的,简单测试了一下能work但是不保证后期不会出问题.如果你在尝试过程中出现了任 ...

  5. [转帖]PostgreSQL的时间/日期函数使用

    PostgreSQL的时间/日期函数使用 https://www.cnblogs.com/mchina/archive/2013/04/15/3010418.html 这个博客的 文章目录比上一个好十 ...

  6. java8 List集合的排序,求和,取最大值,按照条件过滤

    public class Java8Test {       public static void main(String[] args) {           Person p1 = new Pe ...

  7. 【计算机组成原理】中央处理器CPU

    一.CPU的功能和基本结构 1.功能 当用计算机解决某个问题是,我们首先必须为他编写程序,程序是一个指令序列,这个序列明确告诉计算机应该执行什么操作,在什么地方找到用来操作的数据,一旦把程序装入内存器 ...

  8. 前端学习:HTML的学习总结(图解)

    .html 文件代码笔记 前端学习:HTML的学习总结(图解) HTML简介 HTML基本标签 HTML表单标签 HTML内联框架标签和其他

  9. 脱离 WebView 的通信 JavaScriptCore

    JavascriptCore JavascriptCore 一直作为 WebKit 中内置的 JS 引擎使用,在 iOS7 之后,Apple 对原有的 C/C++ 代码进行了 OC 封装,成为系统级的 ...

  10. UI事件定位--HitTest

    In computer graphics programming, hit-testing (hit detection, picking, or pick correlation) is the p ...