org.springframework.beans.NotWritablePropertyException:Bean property 'xxxService' is not writable or has an invalid setter method.
- 完整报错提示信息: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'?
- 解决方案:
- 保证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.的更多相关文章
- 错误:Bean property 'sessionFactory' is not writable or has an invalid setter method.
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' ...
- 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 ...
- Bean property '**DAO' is not writable or has an invalid setter method
ApplicationContext.xml中配置有问题,里面的bean的属性名称写错了. ApplicationContext.xml中写的是loginDAO,在java类里配置的bean却写成了l ...
- error: Bean property 'userDAO' is not writable or has an invalid setter method.
使用Spring属性注入的方式,没有在ServiceImpl中setDao,导致程序报错 public class AddressServiceImpl implements IAddressServ ...
- 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 ...
- 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 ...
- Bean property XX' is not writable or has an invalid setter method
刚刚搞spring.property注入时遇到这个问题,百度一下.非常多人说是命名或者get set方法不一致的问题,可是这个我是知道的.写的时候也注意到这些.所以应该不是这个问题.以为是xml头写的 ...
- 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 ...
- Caused by: org.springframework.beans.NotWritablePropertyException
1.错误叙述性说明 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -h ...
随机推荐
- Qt 绘制图表 - Qt Charts版
一.前言 自从 Qt 发布以来,给广大跨平台界面研发人员带来了无数的福利.但是Qt自己却一直没有提供自带的图表库,这就使得 QWT.QCustomPlot 等第三方图表库有了巨大的生存空间,为了降低开 ...
- ascii码对照表(收藏)
https://blog.csdn.net/yueyueniaolzp/article/details/82178954 十进制代码 十六进制代码 MCS 字符或缩写 DEC 多国字符名 ASCII ...
- SQL --------------- GROUP BY 函数
Aggregate 函数常常需要添加 GROUP BY 语句,Aggregate函数也就是常说的聚和函数,也叫集合函数 GROUP BY语句通常与集合函数(COUNT,MAX,MIN,SUM,AVG) ...
- tomcat闪退的解决思路
用Tomcat总会遇到启动Tomcat闪退的问题. 什么叫闪退啊,就是闪一下,就退出了控制台. 都闪退了,为啥闪退也不知道呀,又没有错误信息,所以就要先阻止闪退,先看到错误信息,知道启动不起来的原因. ...
- sql server锁表、查询被锁表、解锁被锁表的相关语句
MSSQL(SQL Server)在我的印象中很容易锁表,大致原因就是你在一个窗口中执行的DML语句没有提交,然后又打开了一个窗口对相同的表进行CRUD操作,这样就会导致锁表.锁表是一种保持数据一致性 ...
- 【CTS2019】随机立方体(容斥)
[CTS2019]随机立方体(容斥) 题面 LOJ 洛谷 题解 做这道题目的时候不难想到容斥的方面. 那么我们考虑怎么计算至少有\(k\)个极大值的方案数. 我们首先可以把\(k\)个极大值的位置给确 ...
- spring-session(二)与spring-boot整合实战
前两篇介绍了spring-session的原理,这篇在理论的基础上再实战. spring-boot整合spring-session的自动配置可谓是开箱即用,极其简洁和方便.这篇文章即介绍spring- ...
- WebRTC之框架与接口
出处:http://www.cnblogs.com/fangkm/p/4370492.html 上一篇文章简单地介绍了下WebRTC的协议流程,这一篇就开始介绍框架与接口. 一提到框架,本能地不知道从 ...
- 使用Net Mail发送邮件
最近用到了发送邮件这个功能,简单记录一下案例.代码如下: using System; using System.Collections.Generic; using System.Linq; usin ...
- [转]ASP.NET Core Web API 最佳实践指南
原文地址: ASP.NET-Core-Web-API-Best-Practices-Guide 转自 介绍# 当我们编写一个项目的时候,我们的主要目标是使它能如期运行,并尽可能地满足所有用户需求. 但 ...