Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of t

芯片硅前验证技术与驱动工程师实战指南 硅前验证是芯片开发流程中的关键环节,通过pre-silicon simulation等技术手段在流片前验证设计正确性。其核心技术包括软件仿真、FPGA原型验证和硬件仿真器解决方案,涉及Linux驱动开发、芯片架构理解和波形分析等核心技能。作为连接芯片设计与系统集成的桥梁,硅前验证能早期发现设计缺陷,节省数百万美元流片成本。以Cadence Palladium为代表的硬件仿真器,通过专用服务器系统实现比纯软件方案快100-1000倍的仿真速度,为驱动工程师提供完整的外设模型验证环境。掌握硅前验证技术可显著提升 阅读详情

Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 的解决方案  

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RegService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'RegDao' of bean class [com.starheld.serviceimp.RegServiceImp]: Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    Caused by:
    org.springframework.beans.NotWritablePropertyException: Invalid property 'RegDao' of bean class [com.starheld.serviceimp.RegServiceImp]: Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
     at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:751)
     at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:608)
     at org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(AbstractPropertyAccessor.java:49)
     at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:74)
     at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:970)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
     at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
     at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
     at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
     at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
     at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
     at org.apache.catalina.core.StandardService.start(StandardService.java:448)
     at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
     at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

 

如上报错是由于 注入dao名和注入service名写错了,必须要保证程序中的getter setter方法中的命名和注入名一致。

applicationContext.xml中的配置如下:

                     <bean id="RegDao" class="com.starheld.daoimp.RegDaoImp" scope="singleton">
  <property name="sessionFactory" ref="sessionFactory"></property>
 </bean>
 <!--  把service交给Dao -->
 
  <bean id="RegService" class="com.starheld.serviceimp.RegServiceImp">
  <property name="
reg" ref="RegDao"></property>
 </bean>

 <bean id="reg" class="com.starheld.action.RegAction">
  <property name="
regservice" ref="RegService"></property>
 </bean>

程序中的配置如下:

action的部分代码:

public class RegAction extends ActionSupport {

 private User user;
 
private RegService regservice;

 public RegService getRegservice() {
  return regservice;
 }

 public void setRegservice(RegService regservice) {
  this.regservice = regservice;
 }

 public User getUser() {
  return user;
 }

 public void setUser(User user) {
  this.user = user;
 }

serviceImp.java代码:

public class RegServiceImp implements RegService {
 
 
public RegDao reg;


 
 public boolean find(String username) {
  // 查找用户名是否存在
  
  return reg.find(username);
 }

 public void saveReg(User user) {
  // 保存注册信息
  this.reg.SaveUser(user);
 }

 public RegDao getReg() {
  return reg;
 }

 public void setReg(RegDao reg) {
  this.reg = reg;
 }


}

如上标红的就是要对应一致的。如果命名大小写不一致就会出现上面的异常。


PS射击游戏射线检测优化:原理、工程与全链路高性能实现 射线池:减少GC,提升批量检测效率。分层检测:先粗后细,远距离射击高效判定。批量检测:并行处理,适合大量射线场景。空间结构:进一步加速大场景检测。下面继续深入射线检测优化,补充更多实用细节和进阶技巧,包括空间分区加速、射线检测多线程/异步化、射线合并与分帧、射线池通用模板、常见性能陷阱与调优建议等。对于极端性能需求,可自定义轻量级物理系统,仅检测关键对象(如玩家、子弹),跳过复杂物理引擎。结合AABB、OBB、球体等简单碰撞体,射线-包围体检测极快。空间分区+分层检测是大场景射线优化核心。 阅读详情

相关推荐

别再只用固定线了!聊聊Android车机‘快速倒车’与‘正常倒车’的UI与数据流核心差异(附动态轨迹线实现原理)

本文深度解析Android车机中快速倒车与正常倒车的核心差异,探讨从内核级视频流水线到动态轨迹线的技术实现。快速倒车通过内核直接操作FrameBuffer实现2秒内响应,而正常倒车则支持多传感器数据融合与动态UI元素。文章还分享了动态轨迹线的算法实现与性能优化技巧,帮助开发者打造极致的倒车体验。

weixin_42550597的博客 256

Bean property 'dao' is not writable or has an invalid setter method. Does the parameter type of the

Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'dao' of bean class [com.baidu.service.StudentServiceImpl]: Bean property 'dao' is not writable or has an invalid setter method. Does the parameter type of the setter match

山西信男的博客 2028

易智联LM401模块学习(一)——初识Lora

Lora

weixin_46046597的博客 1056

Bean property ' ' is not writable or has an invalid setter method原因

Bean property ' ' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?  原因是我的service实现中没有注入dao 注入即可:   private Shop...

eternal403的专栏 1534

Anaconda详细安装及使用教程(带图文)

Anacond的介绍 Anaconda指的是一个开源的Python发行版本,其包含了conda、Python等180多个科学包及其依赖项。因为包含了大量的科学包,Anaconda的下载文件比较大(约531 MB),如果只需要某些包,或者需要节省带宽或存储空间,也可以使用Miniconda这个较小的发行版(仅包含conda和Python)。 Conda是一个开源的包、环境管理器,可以用于...

代码帮 186万+

STM32+OV7670实战:5步搞定低成本人脸识别门禁系统(附完整代码)

本文详细介绍了基于STM32单片机和OV7670摄像头构建低成本离线人脸识别门禁系统的完整实战方案。文章从硬件选型、电路设计避坑入手,逐步讲解了图像采集优化、轻量级人脸检测与LBP特征提取策略,并提供了离线人脸库管理、特征比对以及系统集成的具体实现方法,附有核心代码示例,旨在帮助开发者快速实现可落地的嵌入式视觉应用。

kubernetes8ctl的博客 569

Spring报错:Bean property ‘per‘ is not writable or has an invalid setter method.

Spring报空指针异常错误或无效属性

weixin_45161329的博客 808

2021年软件测试面试题大全

简述测试流程: 1、阅读相关技术文档(如产品PRD、UI设计、产品流程图等)。 2、参加需求评审会议。 3、根据最终确定的需求文档编写测试计划。 4、编写测试用例(等价类划分法、边界值分析法等)。 5、用例评审(主要参与人员:开发、测试、产品、测试leader)。 6、开发提交代码至SVN或者GIT ,配管搭建测试环境。 7、执行测试用例,记录发现的问题。 8、验证bug与回归测试。 9、编写测试报告。 10、产品上线。 补充测试用例设计过程: 根据需求得出测试需求 设计测试方

hard_days的博客 20万+

Mybatis-Plus设置全局ID类型报错:Bean property 'idType' is not writable or has an invalid setter method.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/ApplicationContext.xml]: Cannot resolve referen...

银河小分队的博客 758

DDR5 输入时钟抖动规范全解析!技术宅必看

简单说,时钟抖动就是时钟信号边沿的“颤抖”——信号本来应该在某个固定时间跳变,但实际时刻可能会前后波动。这种波动可能是随机的,也可能是确定性的。随机抖动(Random Jitter, Rj):符合高斯分布,像是你家猫咪不经意的晃动。确定性抖动(Deterministic Jitter, Dj):受限于特定周期或模式,像是邻居装修时的规律敲击声。⚠️ 注意,如果时钟抖动超出规格,DDR5可能无法正确接收或发送数据,内存错误、系统崩溃可就跟着来了!

weixin_43199439的博客 394

LSTM在交通流量预测中的应用:优化城市交通管理

我们使用的数据集来自某个城市的交通监测系统,包含多个监测点在不同时间段内的交通流量记录。每个监测点的数据包括时间戳、交通流量、天气状况和道路状态等信息。

斌擎科技 1259

is not writable or has an invalid setter method错误的解决

java中在配置spring时,遇到is not writable or has an invalid setter method的错误一般是命名方式的问题 需要写成private userInfoDao userinfoDao;(这里前面是小写,后面是大写) 在get和set方法中,需要写成这样get 或set之后只能有两个字母大写 private userInfoDao userinfo...

weixin_30722589的博客 1029

5、自适应 RBF 神经网络控制方法解析

本文详细解析了基于RBF神经网络的多种自适应控制方法,包括针对函数未知、参数未知以及存在外部干扰的非线性系统的控制策略。通过李雅普诺夫稳定性理论设计自适应律,确保闭环系统稳定,并结合仿真示例和MATLAB代码实现,展示了方法的有效性。文章还对比了不同控制方法的适用场景,并给出了实际应用流程,为复杂系统控制提供了系统性解决方案。

ol789012的博客 75

SSH整合中的Bean property * is not writable or has an invalid setter method问题

做黑马的CRM网站SSH整合后一直报错,总是说Userservice中没有添加set方法,但是实际上set方法(自带的set方法生成的是实体对象的set,不是类的set,切记,改完实体对象的名字后也要改set的名字)已经写了, //注入到service     private UserService userservice ;               public void setUser...

wh122714892的博客 700

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Bean property 'xxxDao' is not writable or has an invalid setter method. Does the parameter type of

报错日志: Error creating bean with name 'kafkaService' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Error setting property values; nested exception is org.springframewor...

WZY_snail的博客 1548

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Spring启动报错:Bean property ‘dglist‘ is not writable or has an invalid setter method. Does the paramete

Spring启动报错:Bean property ‘dglist’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 原因是applicationContext.xml配置的bean与实际使用的名称不一致导致的,也可能是set方法名称导致的 ...

qq_42383087的博客 447

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

使用spring注入时出现is not writable or has an invalid setter method

在web-application-config.xml中定义               结果,运行时出错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeServiceDest' defined in ServletContext re

瑺圊樹的专栏 1132

spring框架学习之报错:Bean property ‘source‘ is not writable or has an invalid setter method.

报错信息: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'source' of bean class [com.XX.XXX.]: Bean property 'xx' is not writa...

simple_237615452的博客 850

Does the parameter type of the setter match the return type of the getter?

在添加spring配置文件的时候我遇到的一个问题  Bean property 'targetObject' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 是在注入成员变量的时候出了问题 经过在...

博客 5985

mediaTypes错误(Bean property 'mediaTypes' is not writable or has an invalid setter method.)

ERROR:Bean property 'mediaTypes' is not writable or has an invalid setter method. Does theparameter type of the setter match the return type of the getter?后续spring版本中的mediaTypes居然不支持setter方法了 (解决方法亲测...

此处省略三千字 5464

Bean property ‘bookDao‘ is not writable or has an invalid setter method. Does the parameter type of

【代码】Bean property ‘bookDao‘ is not writable or has an invalid setter method. Does the parameter type of。

m0_67849805的博客 491

SSH框架 Bean property * is not writable or has an invalid setter method错误分析与解决方法

转自:http://blog.csdn.net/naughty610/article/details/5619092错误出现提示:org.springframework.beans.NotWritablePropertyExcep tion:Bean property 'SysUserService' is not writable or has an invalid setter method:

jim_007的博客 1962

Spring 配置文件报错:Bean property 'xxx' is not writable or has an invalid setter method

直接翻译就是 名称为“xxx”的bean不能进行写操作或者有一个无效的setter方法   Bean property 'xxx' is not writable or has an invalid setter method. Did you mean 'xxx'? 这是以前处理过的老问题了,但是最近又出现了。 这样的问题一般有几种可能 1 变量名错误 ,这是比较简

zhangda0000001的博客 1万+

异常处理:Bean property 'XXX' is not writable or has an invalid setter method.

nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'indexWriterJournalCreator' of bean class [com.ourchem.data.lucene.impl.LuceneJournalServiceImpl]: Bean property 'indexWriterJournalCreator' is not writable or has

有范管理美学 | 公众号/头条号:有范管理美学 5901

Bean property 'xxx' is not writable or has an invalid setter method解决方案

出现此问题的原因是在spring-actions.xml中配置有问题,里面的bean的属性名称用 与你 注入的类名称不一致spring-actions.xml public class BookService2Impl implements BookService2 { //方式2 接口+setter方法 public BookService2Impl(){ System.out.pri...

qq_41258326的博客 3473

错误 —— Spring: Bean property 'xxx' is not writable or has an invalid setter method.

使用Spring 的xml 方式装配Bean,启动项目提示错误:Error creating bean with name 'finalreportservice' defined in ServletContext resource [/WEB-INF/spring-bean.xml]: Error setting property values; nested exception is org...

永远的北极光 8911
上一篇: java.io.IOException: Attempted read on closed stream.
下一篇: java: axis2 Web Service四种调用模式
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值