开发者

Architecture for Spring Webflow 2 bean definitions

I have a project that uses Spring Webflow 2, extensively. There's well over 30 flows, each with a non-trivial number of beans. I've noticed that the application has been slowly gaining in startup time, and after setting the log level to debug and running through the logs, it looks开发者_如何学C like the problem is the increasing number of flows. To clarify a bit, I have several applicationContext files in my Spring app that are common, and then beans specific to each flow are placed in their own file, and then included in the larger applicationContext with an <import> element. Is there a better way to structure the beans I use with webflow ? It's at the point where the startup time is becoming an issue.


I was using a validator setup that used one central registry for Hibernate-based validators, and created Spring validators by referencing that central registry from each webflow flow application context that I was creating. The parent application context lookups turned out to be what was taking the majority of the time. I refactored them to all use a single, common validator under the Spring Validator interface, and cut the application startup time in half.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜