ifeilong / feilong-spring

:gem:focus on spring
Apache License 2.0
4 stars 12 forks source link

ContextRefreshedLoggingListener 耗时比较长 #107

Open venusdrogon opened 6 years ago

venusdrogon commented 6 years ago

ContextRefreshedLoggingListener 耗时比较长

image

venusdrogon commented 6 years ago

18:53:08 INFO  (AbstractContextRefreshedEventListener.java:112) onApplicationEvent() - begin [com.feilong.spring.event.ContextRefreshedLoggingListener] 's onApplicationEvent
18:53:08 DEBUG (ApplicationContextUtil.java:69) getApplicationContextInfoMapForLog() - begin read [WebApplicationContext for namespace 'dispatcherServlet-servlet'] info
18:53:08 DEBUG (ApplicationContextUtil.java:126) buildBeanDefinitionNameAndClassMap() - begin build [WebApplicationContext for namespace 'dispatcherServlet-servlet'] BeanDefinitionNameAndClassMap
18:53:08 DEBUG (ApplicationContextUtil.java:136) buildBeanDefinitionNameAndClassMap() - end build [WebApplicationContext for namespace 'dispatcherServlet-servlet'] BeanDefinitionNameAndClassMap,use time: [21毫秒]
18:53:08 DEBUG (ApplicationContextUtil.java:69) getApplicationContextInfoMapForLog() - begin read [Root WebApplicationContext] info
18:53:08 DEBUG (ApplicationContextUtil.java:126) buildBeanDefinitionNameAndClassMap() - begin build [Root WebApplicationContext] BeanDefinitionNameAndClassMap
18:54:36 DEBUG (ApplicationContextUtil.java:136) buildBeanDefinitionNameAndClassMap() - end build [Root WebApplicationContext] BeanDefinitionNameAndClassMap,use time: [1分钟28秒240毫秒]
18:54:36 DEBUG (ApplicationContextUtil.java:101) getApplicationContextInfoMapForLog() - end read [Root WebApplicationContext] info,use time: [1分钟28秒241毫秒]
18:54:36 DEBUG (ApplicationContextUtil.java:101) getApplicationContextInfoMapForLog() - end read [WebApplicationContext for namespace 'dispatcherServlet-servlet'] info,use time: [1分钟28秒266毫秒]

可以看出 root 的 构造map 时间长