您的位置:首页 > 运维架构 > Tomcat

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

2018-01-27 11:51 423 查看
写好服务端程序,发布服务时,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实现类中用到的名称要一致。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐