• 完整报错提示信息: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. bizcharts 图表内容居中

    当图表内的数据只有一组时,会紧靠在y轴上,如下图: 想要图表的内容居中,解决方法分两种情况. 第一种:如果x轴是日期,则代码设置如下,图表的内容就居中了 const cols = { x: { ali ...

  2. SFTP 定时任务下载

    1.上传 winscp.exe /console /command "option batch continue" "option confirm off" & ...

  3. WPF 精修篇 旋转 RotateTransForm

    原文:WPF 精修篇 旋转 RotateTransForm 旋转 RotateTransform Angle 角度 CenterY ,CenterX  中心点位置 和缩小一样 左侧 和右侧 做了对比 ...

  4. 安全漏洞系列(一)---XSS漏洞解决方案(C# MVC)

    参考地址:https://www.cnblogs.com/sagecheng/p/9462239.html 测试项目:MVCDemo 一.XSS漏洞定义 XSS攻击全称跨站脚本攻击,它允许恶意web用 ...

  5. [干货]kubenertes ingress负载grpc

    目录 概述 搭建 生成公私钥 创建secret 创建ingress 访问 概述 一般情况下,我们的系统对外暴露HTTP/HTTPS的接口,内部使用rpc(GRPC)通讯,这时GRPC在服务之间通过se ...

  6. 简单实现Shiro单点登录(自定义Token令牌)

    1. MVC Controller 映射 sso 方法. /** * 单点登录(如已经登录,则直接跳转) * @param userCode 登录用户编码 * @param token 登录令牌,令牌 ...

  7. div等高布局

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  8. 实验吧——看起来有点难(sql盲注)

    题目地址:http://ctf5.shiyanbar.com/basic/inject/ 首先当然是拿admin/admin来试试啊,多次测试发现,有两种错误提示 1.数据库连接失败! 2.登录失败, ...

  9. Spring Cloud 微服务实战笔记

    Spring Cloud 微服务实战笔记 微服务知识 传统开发所有业务逻辑都在一个应用中, 开发,测试,部署随着需求增加会不断为单个项目增加不同业务模块:前端展现也不局限于html视图模板的形式,后端 ...

  10. INS-35178错误,AMM及ASMM区别

    遇到这个报错,就使用asmm 一般先装库,再opatch到最新补丁,最后dbca建库,物理内存大于4G不能用AMM只能用ASMM 内存越大,全自动管理就越费劲,出错概率就越高,内存抖动 oracle的 ...