I have a collection of unmanaged classes that I are instantiated outside of Spring. I\'ve been attempting to use Spring AOP with load time weaving to @Autowire
In order to instrument LTW you'll need to either use the javaagent or place spring-tomcat-weaver.jar
in the \lib
folder and set up TomcatInstrumentableClassLoader
in context.xml
.
javaagent example:
-javaagent:"${settings.localRepository}/org/springframework/spring-agent/2.5.6.SEC03/spring-agent-2.5.6.SEC03".jar
ClassLoader example:
<Context>
<Loader loaderClass="org.springframework.instrument.classl oading.tomcat.TomcatInstrumentableClassLoader" />
</Context>