Can I override spring beans instatiated with component scanning?

Posted by Pablojim on Stack Overflow See other posts from Stack Overflow or by Pablojim
Published on 2010-05-20T13:55:08Z Indexed on 2010/05/23 22:41 UTC
Read the original article Hit count: 230

Filed under:
|
|

If I use component scanning in Spring 2.5 but then also define a controller in xml.

Do I get two instances of this bean in my application context? If so which instance will be called for its related RequestMappings?

<bean id="myController" class="domain.MyController">
         <property name="filters">
            <list>
                <ref local="filter1"/>
                <ref local="filter2"/>
            </list>
        </property>        
    </bean>

© Stack Overflow or respective owner

Related posts about java

Related posts about spring