启动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实现类中用到的名称要一致。
检查代码发现我在实现类中虽然写了set,get方法,但是后来发现实现类中所定义的名字与spring配置文件中注入的名字不一致,所以错误就在于此。
spring的核心就在于1:控制反转 2:依赖注入。所以依赖注入时名字与使用时名字要对应。即截图中红框内名称一致。
即配置文件中注入的名称与serverImpl实现类中用到的名称要一致。
相关文章推荐
- Spring框架使用 错误:Does the parameter type of the setter match the return type of the getter?
- Does the parameter type of the setter match the return type of the getter? 异常处理
- 【错误】Does the parameter type of the setter match the return type of the getter
- 【错误】Does the parameter type of the setter match the return type of the getter
- Does the parameter type of the setter match the return type of the getter?
- Does the parameter type of the setter match the return type of the getter?
- BeanCreationException:Does the parameter type of the setter match the return type of the getter
- Does the parameter type of the setter match the return type of the getter?
- Does the parameter type of the setter match the return type of the getter?
- Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of t
- Bean property 'address' is not readable or has an invalid getter method: Does the return type of th
- Bean property 'esyerDao' is not writable or has an invalid setter method. Does the parameter type of
- Description Resource Path Location Type Java compiler level does not match the version of the in解决方法
- Type Java compiler level does not match the version of the instal
- The file is absent or does not have execute permission 启动tomcat异常
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of the ins
- Type Java compiler level does not match the version of the installed
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- Description Resource Path Location Type Java compiler level does not match the version of(图解)