In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces how to debug the startup speed of Spring, the content is very detailed, interested friends can refer to, hope to be helpful to you.
When debugging spring applications, the startup speed of dozens of seconds or even minutes of some applications will slow down the whole debugging speed. Waiting time is maddening.
Environment
Configuration:
Thinkpad t410 memory: 4G memory CPU:Intel P8700 dual core 2.53GHZ system: WIN XP development tool: Intellij IDEA 12.0.4 Maven + spring3.2.3 + hibernate4.2.2+Spring data jpa 1.3.1
Spring container startup speed before optimization:
16890 milliseconds = (14609 milliseconds loaded by ContextLoaderListener) + 2281 milliseconds (loaded by Springmvc)
Optimized startup speed of spring container:
7797 milliseconds = (6563 milliseconds loaded by ContextLoaderListener) + 1234 milliseconds (loaded by Springmvc)
The speed has increased by more than half, and later in the debugging phase, most of them stay at this time or so.
Note: here is only the startup speed of the spring container, not the speed at which the server starts. Because my system hasn't been cleaned for a long time, otherwise it might be faster.
Accelerate Spring
1. Scan and comment Bean
Write more accurate scan paths, such as scan @ Service and @ Repository:
Writing this way is much faster than writing com.sishuok.es directly, because there will be very few class scanned in this way.
Also, such as springmvc scanning:
Only the web.controller packages of the project are scanned here, so there is little class scanned.
There is also the scanning of transactions:
Execution (* com.sishuok.es..service..*+.* (..)
It's also the same with spring data jpa:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.