Spring AOP slow startup time

前端 未结 6 1037
轻奢々
轻奢々 2020-12-11 05:59

We\'re using Spring (3.0.5) AOP with @AspectJ style annotations and . We use it for transactions, auditing, profilin

6条回答
  •  心在旅途
    2020-12-11 06:14

    Do you have any circular dependency? That's what's killing my current app.

    I know that's not really a solution but I would break up the context to run different services in different vms, SOA-style. That should allow all your apps to have a small startup time and that should also give you some flexibility to change the implementation of these services more easily, small amount of code to test, etc.

    I didn't do that in one of my apps and now startup time is at about 3/4 mins which is crazy (we have a couple of thousand beans). That problem doesn't go away, it will only get worse, but if you try to do something about it too late, the app will be too big and too difficult to break up.

    Another thing I would look into is hibernate, creating the session factory can be pretty slow.

提交回复
热议问题