实例工厂方法创建Bean时配置init-method配置文件报错,但程序能正常运行,找不到原因很是郁闷!下面是配置:<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="personServiceFactory" class="service.impl.PersonServiceBeanFactory"/>
<bean lazy-init="false" init-method="init" destroy-method="destory" id="personService" factory-bean="personServiceFactory" factory-method="createPersonServiceBean"/>
</beans>以下是报错:Multiple annotations found at this line:
- Destroy-method 'destory' not found in bean class
'service.PersonService'
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="personServiceFactory" class="service.impl.PersonServiceBeanFactory"/>
<bean lazy-init="false" init-method="init" destroy-method="destory" id="personService" factory-bean="personServiceFactory" factory-method="createPersonServiceBean"/>
</beans>以下是报错:Multiple annotations found at this line:
- Destroy-method 'destory' not found in bean class
'service.PersonService'
解决方案 »
- struts forward简单问题
- ibatis 动态语句 iterate使用 在线等
- 推荐一文学习SSH十分权威的书籍
- 求助!!如何实现分布式树状菜单??
- j2ee之我的项目计划(希望大家踊跃参与说出自己的想法)serf()进来看看说说你的看法
- hibernate 问题,大家都来看看
- 请filippo1980(管药师★吾辈岂是池中物,一遇风云便化龙)和keke1(龙)进来领分!谢谢你们的帮助,请再谈谈你们对XML的前景的看法!
- 用xsl如何判别xml节点的值????????
- EJB如何生成主键?
- j2ee搞的我好郁闷
- swt中用什么做类似qq聊天框
- java连接jdbc数据库查询的时候出现个问题.
'service.PersonService,看嘛它是到PersonService中找的是我大意了没注意。这个问题解决了,谢谢大家了。不过实例工厂方法创建Bean时配置又发现一个新毛病,在实现类中属性的get(),set()方法Spring也到接口中去早,这就郁闷了,一直没有找到解决方法,请各位支支招!再次谢谢了!