public enum ScopedProxyMode extends Enum<ScopedProxyMode>
For a more complete discussion of exactly what a scoped proxy is, see the section of the Spring reference documentation entitled 'Scoped beans as dependencies'.
ScopeMetadata| 枚举常量和说明 |
|---|
DEFAULT
Default typically equals
NO, unless a different default
has been configured at the component-scan instruction level. |
INTERFACES
Create a JDK dynamic proxy implementing all interfaces exposed by
the class of the target object.
|
NO
Do not create a scoped proxy.
|
TARGET_CLASS
Create a class-based proxy (uses CGLIB).
|
public static final ScopedProxyMode DEFAULT
NO, unless a different default
has been configured at the component-scan instruction level.public static final ScopedProxyMode NO
This proxy-mode is not typically useful when used with a
non-singleton scoped instance, which should favor the use of the
INTERFACES or TARGET_CLASS proxy-modes instead if it
is to be used as a dependency.
public static final ScopedProxyMode INTERFACES
public static final ScopedProxyMode TARGET_CLASS
public static ScopedProxyMode[] values()
for (ScopedProxyMode c : ScopedProxyMode.values()) System.out.println(c);
public static ScopedProxyMode valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值