I am using Spring 3.2.9, Tomcat 6.0.44
I am trying to configure my application\'s Spring instrumentation provider (e.g. spring-instrumentation.jar) for load-time wea
This is the code that I managed to use in order to removed the exception that you mentioned. Basically you have to implement the LoadTimeWeavingConfigurer and override the method getLoadTimeWeaver().
@Configuration
@ComponentScan(basePackages = "org.myproject")
@EnableAspectJAutoProxy
@EnableSpringConfigured
@EnableLoadTimeWeaving(aspectjWeaving = EnableLoadTimeWeaving.AspectJWeaving.AUTODETECT)
public class Config implements LoadTimeWeavingConfigurer {
@Override
public LoadTimeWeaver getLoadTimeWeaver() {
return new ReflectiveLoadTimeWeaver();
}
@Bean
public InstrumentationLoadTimeWeaver loadTimeWeaver() throws Throwable {
InstrumentationLoadTimeWeaver loadTimeWeaver = new InstrumentationLoadTimeWeaver();
return loadTimeWeaver;
}
}