首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring框架Tomcat LoadTimeWeaving

Spring框架Tomcat LoadTimeWeaving
EN

Stack Overflow用户
提问于 2012-07-03 07:50:30
回答 1查看 984关注 0票数 2

我使用tomcat作为我的use服务器,并希望对我的所有@OneToOne注释使用fetch = FetchType.lazy注释,但是spring会还原我的懒惰设置,给我eclipselink链接警告:

代码语言:javascript
复制
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文件之后,我得到了一个

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-03 21:07:48

我建议使用静态编织,请参见

http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving/Static_Weaving

可以在Spring中让编织工作。我建议从Tomcat之外的Spring教程开始,然后慢慢地增加复杂性,直到您在Tomcat中使用它。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11302732

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档