10

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)

1 Answer 1

6

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.