Does the parameter type of the setter match the return type of the getter?
来源:互联网 发布:太原资海网络 编辑:程序博客网 时间:2024/04/29 11:12
配置spring时,遇到了一个小问题。提示can't create inner bean ....... Does the parameter type of the setter match the return type of the getter? 在网上收了下,找到了解决方法。自己记录下。
spring配置文件要求在server设置getter和setter,而且方法名有要求,bean id 首字母小写
如spring配置为:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!--定义业务逻辑服务类-->
<bean id="saleinfoService" parent="hibernateTransactionProxy">
<property name="target">
<bean class="com.mfsoft.platform.saleinfo.service.SaleinfoServiceImpl">
<property name="saleinfoDAO">
<ref local="saleinfoDAO"/>
</property>
</bean>
</property>
</bean>
<!--定义DAO-->
<bean id="saleinfoDAO" class="com.mfsoft.platform.saleinfo.dao.SaleinfoDAOImpl">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate" />
</property>
</bean>
</beans>
则SaleinfoServiceImpl应写为:
public class SaleinfoServiceImpl extends BaseServiceImpl<SaleBasic,Integer> implements SaleinfoService {
private SaleinfoDAO testDAO;
public SaleinfoDAO getSaleinfoDAO() {
return testDAO;
}
public void setSaleinfoDAO(SaleinfoDAO testDAO) {
this.testDAO = testDAO;
}
}
- 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? 异常处理
- Spring框架使用 错误:Does the parameter type of the setter match the return type of the getter?
- Spring setter match the return type of the getter Spring 命名规范问题
- Bean property 'dao' is not writable or has an invalid setter method. Does the parameter type of the
- Bean property 'RegDao' is not writable or has an invalid setter method. Does the parameter type of t
- Bean property 'esyerDao' is not writable or has an invalid setter method. Does the parameter type of
- Bean property 'address' is not readable or has an invalid getter method: Does the return type of th
- How does the Spring MVC determine the type of a given request parameter
- 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 instal
- Description Resource Path Location Type Java compiler level does not match the version of the insta
- Description Resource Path Location Type Java compiler level does not match the version of the insta
- Description Resource Path Location Type Java compiler level does not match the version of the insta
- Description Resource Path Location Type Java compiler level does not match the version of the instal
- 百万级访问网站前期的技术准备(下)
- jQuery 插件 jQuery UI的使用
- 浮点数越界或者无效-1.#IND000
- Use the wallet to encrypt tablespace,table.
- 工作6年,嵌入式开发,整理资料
- Does the parameter type of the setter match the return type of the getter?
- 2011年.NET面试题总结
- C#小知识点
- android opengl es 源码
- random class 配置sprin定时任务
- php的JSON 总结 json_decode() 解析错误 及 PEAR JSON.PHP使用
- apache
- java script 学习笔记
- 中文命名实体识别之学习笔记一(词性标注)