写好服务端程序,发布服务时,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实现类中用到的名称要一致。