public class ScopedProxyFactoryBean extends ProxyConfig implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.BeanFactoryAware, AopInfrastructureBean
Proxies created using this factory bean are thread-safe singletons and may be injected into shared objects, with transparent scoping behavior.
Proxies returned by this class implement the ScopedObject interface.
This presently allows for removing the corresponding object from the scope,
seamlessly creating a new instance in the scope on next access.
Please note that the proxies created by this factory are class-based proxies by default. This can be customized through switching the "proxyTargetClass" property to "false".
ProxyConfig.setProxyTargetClass(boolean),
序列化表格| 构造器和说明 |
|---|
ScopedProxyFactoryBean()
Create a new ScopedProxyFactoryBean instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setTargetBeanName(String targetBeanName)
Set the name of the bean that is to be scoped.
|
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toStringpublic ScopedProxyFactoryBean()
public void setTargetBeanName(String targetBeanName)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory 在接口中 org.springframework.beans.factory.BeanFactoryAwarepublic Object getObject()
getObject 在接口中 org.springframework.beans.factory.FactoryBean<Object>public Class<?> getObjectType()
getObjectType 在接口中 org.springframework.beans.factory.FactoryBean<Object>public boolean isSingleton()
isSingleton 在接口中 org.springframework.beans.factory.FactoryBean<Object>