# spring项目加载非常慢

2014/11/13 19:24

1. 请检查spring是否运行在debug模式下，是跳转到2 否则跳转到3

2. 查看spring在run模式下是否运行依旧缓慢 是跳转到3，否则跳转到4

3. 请检验是否spring bean加载了多次（quartz加载很有可能导致部分bean被是实例两次） 是跳转到 http://blog.csdn.net/chaijunkun/article/details/6925889 否则跳转到 http://jinnianshilongnian.iteye.com/blog/1883013 按照步骤检验

4. 请将代码中所有代码断点禁用掉或者全部删除重新进入到debug模式下查看加载速度是否变快

i have a java web application, using Spring, Jersey (jax-rs) and Hibernate.

It runs fine and fast, but there are some days it takes a big amount of time to initialize in debug mode only and when it starts is really slow...

I'm using Eclipse 3.6, Apache Tomcat 6 and java 1.6.0_29 for MAC OS X.

Application begin to log slow after writing this log line:

INFO: Initializing Spring root WebApplicationContext

and before this log lines:

30-dic-2011 10.51.25 com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
com.example.project.web.rest

How can I investigate? Any suggestions?

Unfortunately I really don't know what I did to reduce performance..

Thanks a lot for help! Davide.

One thing that's helped me in a similar situation is to delete all breakpoints in Eclipse. It's worth a try.

0
13 收藏

0 评论
13 收藏
0