[ 
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1179?page=comments#action_17722
 ] 

Mika Goeckel commented on XDT-1179:
-----------------------------------

There is a workaround to this problem.

First, copy the spring_xml.xdt file out of the xdoclet-spring-module.jar to a 
place where you can edit (and use) it.
Then change the forAllClassTags line to include 'superclasses="false"' like:

[...]
<XDtClass:forAllClasses>
<XDtClass:forAllClassTags tagName="spring:bean" superclasses="false">
  <bean
[...]

and change the ant task to use this template like:

                        <springxml 
                                
destinationFile="applicationContext-generated.xml"
                                templateFile="${basedir}/etc/spring_xml.xdt"
                                useIds="true"
                                />

This should only use tags from the class which is actually processed.


> create duplicate spring bean id.
> --------------------------------
>
>          Key: XDT-1179
>          URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1179
>      Project: XDoclet
>         Type: Bug

>   Components: Spring Module
>  Environment: windows jdk1.4.2
>     Reporter: huiqiang guo
>     Assignee: xdoclet-devel (Use for new issues)

>
>
> /**
>  * @spring.bean 
>  *    id = "baseDao"
>  * @spring.property
>  *    name = "sessionFactory"
>  *    ref = "sessionFactory"
>  *
>  */
> public  class BaseDaoHibernateImpl 
> extends HibernateDaoSupport implements BaseDao {
> /**
>  * @spring.bean 
>  *    id = "equipmentDao"
>  *
>  */
> public class EquipmentDaoHibernateImpl extends BaseDaoHibernateImpl 
> implements EquipmentDao {
> in springdoclet will generate these bean ids:
>   <bean
>       id="equipmentDao"
>       class="com.xxx.dao.spring.hibernate.EquipmentDaoHibernateImpl"
>   >
>     <property name="sessionFactory">
>       <ref bean="sessionFactory"/>
>     </property>
>   </bean>
>   <bean
>       id="baseDao"
>       class="com.xxx.dao.spring.hibernate.EquipmentDaoHibernateImpl"
>   >
>     <property name="sessionFactory">
>       <ref bean="sessionFactory"/>
>     </property>
>   </bean>
>   <bean
>       id="baseDao"
>       class="com.xxx.dao.spring.hibernate.BaseDaoHibernateImpl"
>   >
>     <property name="sessionFactory">
>       <ref bean="sessionFactory"/>
>     </property>
>   </bean>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to