|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=METHOD) @Retention(value=RUNTIME) public @interface ScopedProxy
Marker annotation identical in functionality with <aop:scoped-proxy/> tag. Provides a smart proxy backed by a scoped bean, which can be injected into object instances (usually singletons) allowing the same reference to be held while delegating method invocations to the backing, scoped beans.
Used with scoped beans (non-singleton and non-prototype).@Configuration public class ScopedConfig { @Bean(scope = "myScope") @ScopedProxy public SomeBean someBean() { return new SomeBean(); } @Bean public SomeOtherBean() { return new AnotherBean(someBean()); } }See Spring reference documentation for more details.
Optional Element Summary | |
---|---|
boolean |
proxyTargetClass
Use CGLib-based class proxies (true) or JDK interface-based (false). |
public abstract boolean proxyTargetClass
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |