I have a bean defined in XML that looks like this:
<bean ... scope="workflow">
<aop:scoped-proxy proxy-target-class="false" />
</bean>
I am removing this bean from the config file and marking the class that bean was instantiated from as @Component
. From other questions about scoped proxy, I know there is a proxyMode
on the @Scope
annotation. In this case, if I want to emulate the above XML, is proxyMode = ScopedProxyMode.NO
the same thing as proxy-target-class="false"
? Like so:
@Component
@Scope(value = "workflow", proxyMode = ScopedProxyMode.NO)
I believe that the actual answer is:
@Scope(proxyMode=ScopedProxyMode.INTERFACES)
Citation: http://forum.spring.io/forum/spring-projects/aop/101899-annotation-equivalent-of-aop-scoped-proxy
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