annotation equivalent of <aop:scoped-proxy>

mkoryak picture mkoryak · Dec 21, 2010 · Viewed 30k times · Source

I am moving from an xml config to annoations. i want to convert a session scoped bean that is

<aop:scoped-proxy>

can this be done with annotations, and if not, what can i do to still keep that declaration working?

edit: I am interested in doing this in Spring 2.5

Answer

axtavt picture axtavt · Dec 21, 2010

In Spring 3.0 it can be specified by the proxyMode attribute of @Scope annotation:

@Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)