Speed of Java – Google App Engine spring MVC annotations

I am developing applications on gae using spring MVC and annotations It takes a long time for the application to load for the first time, and then it will perform well as long as I visit the application But when I leave the application for a minute and then access it again, it takes a long time I've read about people with similar problems, but I haven't talked about solutions Is there anyone who has this problem and can solve it?

One solution is to strip away the comments I want to make as a final choice

thank you

Solution

One way to speed up the initial loading of spring is to disable < context: component scan base package = "app. Controllers" / > in springapp servlet XML and manually specify all controllers in the application, as follows:

<bean id="rootController" class="app.controllers.RootController" ></bean>
<bean id="otherController" class="app.controllers.OtherController" ></bean>

I use spring MVC on Google App Engine and have loaded the request for about 3 seconds

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>