我使用tomcat作为我的use服务器,并希望对我的所有@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发布于 2012-07-03 21:07:48
我建议使用静态编织,请参见
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving/Static_Weaving
可以在Spring中让编织工作。我建议从Tomcat之外的Spring教程开始,然后慢慢地增加复杂性,直到您在Tomcat中使用它。
https://stackoverflow.com/questions/11302732
复制相似问题