似乎无法让我的 spring webapp 与 jetty-maven 插件一起使用
我总是得到
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.eclipse.jetty.webapp.WebAppClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar
虽然我有:
- 将 MAVEN_OPTS 设置为 javaagent:/Users/blabla/.m2/repository/org/springframework/spring-instrument/3.1.3.RELEASE/spring-instrument-3.1.3.RELEASE.jar
- 将 JAVA_OPTIONS 设置为相同的东西
- 将 dep 添加到spring-instrument和spring-aspects
- 添加
jvmArgs
到-javaagent:....
jetty-maven-plugin 配置