How can I go about setting the scope:
@Component
@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS, value = "prototype")
in XML, instead of using @Scope
annotation?
If you want XML based configuration then you can do it in following way:-
<bean id="YOUR_BEAN_ID" class="YOUR_FULLY_QUALIFIED_CLASSNAME" scope="prototype">
<aop:scoped-proxy proxy-target-class="true"/>
</bean>
You can include Bean definition in xml file as below
<bean id="Simple" class="com.example.Simple" scope="prototype" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With