annotation equivalent of <aop:scoped-proxy>
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
Solution 1:
In Spring 3.0 it can be specified by the proxyMode
attribute of @Scope
annotation:
@Scope(value = "session", proxyMode = ScopedProxyMode.INTERFACES)
Solution 2:
in the spring context xml, do something like:
<context:component-scan base-package="com.startup.failure" scoped-proxy="interfaces" />
Note that you would need to write interfaces for all classes in that package, though.