启动Tomcat显示异常如下:Does the parameter type of the setter match the return type of the getter?

写好服务端程序,发布服务时,spring配置文件提示:can't create inner bean .......  Does the parameter type of the setter match the return type of the getter? 

检查代码发现我在实现类中虽然写了set,get方法,但是后来发现实现类中所定义的名字与spring配置文件中注入的名字不一致,所以错误就在于此。

spring的核心就在于1:控制反转  2:依赖注入。所以依赖注入时名字与使用时名字要对应。即截图中红框内名称一致。

 即配置文件中注入的名称与serverImpl实现类中用到的名称要一致。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值