Class LoadTimeWeavingConfiguration
- java.lang.Object
- org.springframework.context.annotation.LoadTimeWeavingConfiguration
- All Implemented Interfaces:
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.- Since:
- 3.1
- Author:
- Chris Beams
- See Also:
LoadTimeWeavingConfigurer,ConfigurableApplicationContext.LOAD_TIME_WEAVER_BEAN_NAME
Constructor Summary
Constructors Constructor Description LoadTimeWeavingConfiguration()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Constructor Detail
LoadTimeWeavingConfiguration
public LoadTimeWeavingConfiguration()
Method Detail
setImportMetadata
public void setImportMetadata(AnnotationMetadata importMetadata)
Description copied from interface:ImportAwareSet the annotation metadata of the importing @Configurationclass.- Specified by:
setImportMetadatain interfaceImportAware
setLoadTimeWeavingConfigurer
@Autowired(required=false) public void setLoadTimeWeavingConfigurer(LoadTimeWeavingConfigurer ltwConfigurer)
setBeanClassLoader
public void setBeanClassLoader(ClassLoader beanClassLoader)
Description copied from interface: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.- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware- Parameters:
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()