Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the annotation equivalent of aop:scoped-proxy proxy-target-class="false"?

Tags:

java

spring

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)
like image 994
Max Avatar asked Oct 13 '14 17:10

Max


1 Answers

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

like image 164
Nathan Feger Avatar answered Sep 27 '22 20:09

Nathan Feger