【发布时间】:2012-07-03 09:39:01
【问题描述】:
我正在使用 tomcat 作为我的网络服务器,并且想对我所有的 @OneToOne 注释使用 fetch = FetchType.lazy 注释,但是 spring 恢复了我的惰性设置给我 eclipselink 警告:
Reverting the lazy setting on the OneToOne or ManyToOne attribute [student] for the entity class [class org.bixin.dugsi.domain.Registration] since weaving was not enabled or did not occur.
我必须对 tomcat 做什么才能让编织工作,以便我可以使用延迟获取,或者是否有任何其他替代延迟加载关系的方法。我遇到了严重的性能问题?
我现在正在尝试添加加载时间编织,我已将 spring-instruments.jar 和 spring-aspects.jar 添加到我的 tomcat/lib 中,并且在将全局 <context:load-time-weaver/> 添加到我的 applicationContext.xml 文件后,我得到了一个
ClassLoader [sun.misc.Launcher$AppClassLoader] 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
【问题讨论】:
-
那个 SO 问题和提供的 eclipselink 资源没有明确说明事情需要去哪里(spring.instruments.jar)和 context.xml 的更新?
标签: tomcat jpa lazy-loading eclipselink load-time-weaving