我使用this Github tool来分析我的Spring Boot应用程序的启动时间。以下是分析结果的屏幕截图:
我不确定结果有多准确,因为工具说启动时间是41秒,但我的IDE控制台说它花了98秒。
但不管精度如何,最大的块是org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
为什么这个spring组件这么慢,我怎样才能最好地优化启动时间。
发布于 2018-02-25 18:33:44
请分享您在initialization phase...but RequestMappingHandlerMapping中正在做的更多信息:通过@Controler类中的类型和方法级别的@RequestMapping注释创建RequestMappingInfo实例。
https://stackoverflow.com/questions/48976789
复制