春天初始化挂了几分钟

时间:2019-05-09 20:47:51

标签: spring

启动Spring时,它会挂起5分钟左右
如果您查看日志WebApplicationContext:初始化发生在16:36 下一条消息是初始化JPA EntityManagerFactory发生在16:41差不多5分钟后

可能是什么问题?
谢谢!

2019-05-09 16:36:59.619  INFO 18120 --- [  restartedMain] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 10419 ms
2019-05-09 16:41:18.196  INFO 18120 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'portal'
2019-05-09 16:41:18.362  INFO 18120 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2019-05-09 16:41:26.759  INFO 18120 --- [  restartedMain] s.s.l.DefaultSpringSecurityContextSource :  URL 'ldap://ldap01:389', root DN is ''
2019-05-09 16:41:26.863  INFO 18120 --- [  restartedMain] .s.s.l.u.DefaultLdapAuthoritiesPopulator : groupSearchBase is empty. Searches will be performed from the context source base
2019-05-09 16:41:27.128 DEBUG 18120 --- [  restartedMain] com.xerox.printerfarm.config.SecurityConfig       : secureEndPoints => /printers/**,/employees/user/**
2019-05-09 16:41:27.984  INFO 18120 --- [  restartedMain] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6935ce05, org.springframework.security.web.context.SecurityContextPersistenceFilter@5c58f813, org.springframework.security.web.header.HeaderWriterFilter@54fe23e9, org.springframework.security.web.authentication.logout.LogoutFilter@1f81a1d8, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@43759aa7, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@40017880, org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter@60c590e1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@64a8529a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4cd90a9, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6dd6807b, org.springframework.security.web.session.SessionManagementFilter@b218290, org.springframework.security.web.access.ExceptionTranslationFilter@b52b511, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@6d4bb1]
2019-05-09 16:41:28.354  INFO 18120 --- [  restartedMai

更新
将logger.org.springframework中的一些调试代码设置为要调试

2019-05-14 11:45:16.891 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Autowiring by type from bean name 'entityManagerFactory' via factory method to bean named 'entityManagerFactoryBuilder'
2019-05-14 11:45:16.891 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Autowiring by type from bean name 'entityManagerFactory' via factory method to bean named 'dataSource'
2019-05-14 11:45:16.995 DEBUG 22824 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'portal'
2019-05-14 11:45:18.665 DEBUG 22824 --- [  restartedMain] o.s.j.d.DriverManagerDataSource          : Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:@devserv1:1521/DEV01SID]
2019-05-14 11:45:24.169 DEBUG 22824 --- [  restartedMain] o.s.j.d.DriverManagerDataSource          : Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:@devserv1:1521/DEV01SID]
2019-05-14 11:45:24.703 DEBUG 22824 --- [  restartedMain] o.s.j.d.DriverManagerDataSource          : Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:@devserv1:1521/DEV01SID]
2019-05-14 11:46:14.229 DEBUG 22824 --- [alina-utility-2] org.apache.catalina.session.ManagerBase  : Start expire sessions StandardManager at 1557848774228 sessioncount 0
2019-05-14 11:46:14.229 DEBUG 22824 --- [alina-utility-2] org.apache.catalina.session.ManagerBase  : End expire sessions StandardManager processingTime 1 expired sessions: 0
---- 1 min here
2019-05-14 11:47:14.240 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase  : Start expire sessions StandardManager at 1557848834240 sessioncount 0
2019-05-14 11:47:14.240 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase  : End expire sessions StandardManager processingTime 0 expired sessions: 0
---- 1 min here
2019-05-14 11:48:14.246 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase  : Start expire sessions StandardManager at 1557848894246 sessioncount 0
2019-05-14 11:48:14.246 DEBUG 22824 --- [alina-utility-1] org.apache.catalina.session.ManagerBase  : End expire sessions StandardManager processingTime 0 expired sessions: 0
---- 1 min here
2019-05-14 11:49:13.998  INFO 22824 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'portal'
2019-05-14 11:49:14.009 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Creating shared instance of singleton bean 'delegatingApplicationListener'
2019-05-14 11:49:14.018 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Creating shared instance of singleton bean 'liveReloadServerEventListener'
2019-05-14 11:49:14.019 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Creating shared instance of singleton bean 'org.springframework.boot.devtools.autoconfigure.LocalDevToolsAutoConfiguration$LiveReloadConfiguration'
2019-05-14 11:49:14.031 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Creating shared instance of singleton bean 'optionalLiveReloadServer'
2019-05-14 11:49:14.035 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Creating shared instance of singleton bean 'spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties'
2019-05-14 11:49:14.043 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Autowiring by type from bean name 'liveReloadServer' via factory method to bean named 'spring.devtools-org.springframework.boot.devtools.autoconfigure.DevToolsProperties'
2019-05-14 11:49:14.071 DEBUG 22824 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Autowiring by type from bean name 'optionalLiveReloadServer' via factory method to bean named 'liveReloadServer'
2019-05-14 11:49:14.083 DEBUG 22824 --- [  restartedMain] o.s.b.d.livereload.LiveReloadServer      : Starting live reload server on port 35729

0 个答案:

没有答案