• 完整报错提示信息: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. docker下oracle的awr报告下载

  2. Visual Studio 2019 for Mac 离线更新方法

    当你打开Visual Studio 2019 for Mac检查更新时,如果下载更新包很慢,可以尝试如下操作: 打开Finder(访达),找到~/Library/Caches/VisualStudio ...

  3. java json解析(转)

    转自:https://www.cnblogs.com/sunnywindycloudy/p/8343013.html 给服务端发送请求后,服务端会返回一连串的数据,这些数据在大部分情况下都是XML格式 ...

  4. vertica ROS和WOS错误

    频繁写入vertica,可能导致ROS和WOS错误.如下: java.sql.SQLTransientException: [Vertica][VJDBC](5065) ERROR: Too many ...

  5. this的用法-(2019-3)

    作为前端程序员,this应该不会陌生,指执行期的上下文,以下总结了this的几种场景: 1.全局作用域下,this指的就是Window,在控制台输出this,返回的是Window对象 2.在一般函数中 ...

  6. CentOS7 SUDO 笔记--没配置sudoer,为什么有的账号能用sudo命令,有的不能用

    原来: 一.安装linux 创建的用户(管理员打钩)默认在 wheel组里. 1. 使用 cat /etc/passwd 查看用户所在组.中间那个数字是 groupid 不太好看 2.使用 cat / ...

  7. Java 微信支付分对接记录 (先享后付)

    微信支付分(先享后付)对接记录: 微信支付分对接步骤 填写开通支付分的申请表格 此步骤大概需要审核 1-3 个工作日; (模板-服务信息配置表-[先享后付免确认]-[商户名].xls) 填写商户信息 ...

  8. tomcat 下 base64图片上传超过2m的解决方案

    方案一: tomcat部署下默认post请求提交参数大小为2M左右,超过这个大小,就会传值不成功 要使post请求参数无大小限制,需要在server.xml上修改,如下: <Connector ...

  9. 四种软件开发模式:tdd、bdd、atdd和ddd的概念

    看一些文章会看到TDD开发模式,搜索后发现有主流四种软件开发模式,这里对它们的概念做下笔记. TDD:测试驱动开发(Test-Driven Development) 测试驱动开发是敏捷开发中的一项核心 ...

  10. css3贝塞尔曲线过渡动画速率——transition-timing-function:cubic-bezier(n,n,n,n)

    css3过渡动画速率用到的是三阶贝塞尔曲线,曲线有四个点,p0,p1,p2,p3 有几个属性: linear 规定以相同速度开始至结束的过渡效果(等于 cubic-bezier(0,0,1,1)). ...