类 LoadTimeWeavingConfiguration
- java.lang.Object
- org.springframework.context.annotation.LoadTimeWeavingConfiguration
- 所有已实现的接口:
Aware,BeanClassLoaderAware,ImportAware
@Configuration @Role(2) public class LoadTimeWeavingConfiguration extends Object implements ImportAware, BeanClassLoaderAware
@Configurationclass that registers aLoadTimeWeaverbean.This configuration class is automatically imported when using the
EnableLoadTimeWeavingannotation. See@EnableLoadTimeWeavingjavadoc for complete usage details.- 从以下版本开始:
- 3.1
- 作者:
- Chris Beams
- 另请参阅:
LoadTimeWeavingConfigurer,ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME
构造器概要
构造器 构造器 说明 LoadTimeWeavingConfiguration()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 LoadTimeWeaverloadTimeWeaver()voidsetBeanClassLoader(ClassLoader beanClassLoader)Callback that supplies the beanclass loaderto a bean instance.voidsetImportMetadata(AnnotationMetadata importMetadata)Set the annotation metadata of the importing @Configurationclass.voidsetLoadTimeWeavingConfigurer(LoadTimeWeavingConfigurer ltwConfigurer)
构造器详细资料
LoadTimeWeavingConfiguration
public LoadTimeWeavingConfiguration()
方法详细资料
setImportMetadata
public void setImportMetadata(AnnotationMetadata importMetadata)
从接口复制的说明:ImportAwareSet the annotation metadata of the importing @Configurationclass.- 指定者:
setImportMetadata在接口中ImportAware
setLoadTimeWeavingConfigurer
@Autowired(required=false) public void setLoadTimeWeavingConfigurer(LoadTimeWeavingConfigurer ltwConfigurer)
setBeanClassLoader
public void setBeanClassLoader(ClassLoader beanClassLoader)
从接口复制的说明:BeanClassLoaderAwareCallback that supplies the beanclass loaderto a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean'sInitializingBean.afterPropertiesSet()method or a custom init-method.- 指定者:
setBeanClassLoader在接口中BeanClassLoaderAware- 参数:
beanClassLoader- the owning class loader; may benullin which case a defaultClassLoadermust be used, for example theClassLoaderobtained viaClassUtils.getDefaultClassLoader()
loadTimeWeaver
@Bean(name="loadTimeWeaver") @Role(2) public LoadTimeWeaver loadTimeWeaver()