У нас есть некоторые проблемы с приложением Spring Boot 1.5.2 и конечными точками привода.
Иногда, когда мы запускаем приложение весенней загрузки, spring mvc не предоставляет конечные точки привода через HTTP.Я не нахожу никакого шаблона, я заново запускаю одно и то же приложение 3 или 4 раза, чтобы выставить эти конечные точки.
В этом приложении мы используем:
- Java 8
- Пружинная загрузка 1.5.2
- Пружина 4.3.7
Привод настроен на добавление следующей зависимости в build.gradle:
compile 'org.springframework.boot:spring-boot-starter-actuator'
Конфигурация в application.yml:
management:
context-path: /private/actuator
security:
enabled: false
В LOG мы ожидаем найти что-то вроде этого:
2018-12-05 15:15:54.585 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/billing],methods=[GET]}" onto public wtn.integration.webmodel.billing.response.BillingResponse
wtn.integration.controller.BillingController.process()
2018-12-05 15:15:54.587 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events/recover/{reportId}],methods=[GET]}" onto public void wtn.integration.controller.EventCon
troller.recover(java.lang.Long)
2018-12-05 15:15:54.587 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events/recover/{reportId}],methods=[POST]}" onto public void wtn.integration.controller.EventCo
ntroller.recover(java.lang.Long,wtn.integration.api.event.bean.Event)
2018-12-05 15:15:54.588 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events/discard/{reportId}],methods=[GET]}" onto public void wtn.integration.controller.EventCon
troller.discard(java.lang.Long)
2018-12-05 15:15:54.588 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events],methods=[POST]}" onto public void wtn.integration.controller.EventController.process(wt
n.integration.api.event.request.EventRequest)
2018-12-05 15:15:54.591 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframew
ork.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-12-05 15:15:54.591 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.
Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-12-05 15:15:54.672 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationCon
text@1b7f1011: startup date [Wed Dec 05 15:15:46 CET 2018]; root of context hierarchy
2018-12-05 15:15:55.978 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/env/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || appli
cation/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2018-12-05 15:15:55.979 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/env || /private/actuator/env.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-12-05 15:15:55.979 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/beans || /private/actuator/beans.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-12-05 15:15:55.979 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/configprops || /private/actuator/configprops.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-12-05 15:15:55.981 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/info || /private/actuator/info.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-12-05 15:15:55.982 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/heapdump || /private/actuator/heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2018-12-05 15:15:55.983 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/loggers/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.get(java.lang.String)
2018-12-05 15:15:55.983 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/loggers/{name:.*}],methods=[POST],consumes=[application/vnd.spring-boot.actuator.v1+json || application/json],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.set(java.lang.String,java.util.Map<java.lang.String, java.lang.String>)
2018-12-05 15:15:55.983 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/loggers || /private/actuator/loggers.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-12-05 15:15:55.984 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/health || /private/actuator/health.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,java.security.Principal)
2018-12-05 15:15:55.984 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/mappings || /private/actuator/mappings.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-12-05 15:15:55.985 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/dump || /private/actuator/dump.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2018-12-05 15:15:55.985 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/metrics/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2018-12-05 15:15:55.986 [restartedMain] INFO o.s.b.a.e.mvc.EndpointHandlerMapping - Mapped "{[/private/actuator/metrics || /private/actuator/metrics.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
Но мы нашли:
2018-12-05 15:27:10.713 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/billing],methods=[GET]}" onto public wtn.integration.webmodel.billing.response.BillingResponse
wtn.integration.controller.BillingController.process()
2018-12-05 15:27:10.715 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events/discard/{reportId}],methods=[GET]}" onto public void wtn.integration.controller.EventController.discard(java.lang.Long)
2018-12-05 15:27:10.715 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events/recover/{reportId}],methods=[POST]}" onto public void wtn.integration.controller.EventController.recover(java.lang.Long,wtn.integration.api.event.bean.Event)
2018-12-05 15:27:10.715 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events/recover/{reportId}],methods=[GET]}" onto public void wtn.integration.controller.EventController.recover(java.lang.Long)
2018-12-05 15:27:10.715 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/private/events],methods=[POST]}" onto public void wtn.integration.controller.EventController.process(wtn.integration.api.event.request.EventRequest)
2018-12-05 15:27:10.718 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-12-05 15:27:10.718 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-12-05 15:27:10.817 [restartedMain] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6aedc770: startup date [Wed Dec 05 15:27:04 CET 2018]; root of context hierarchy
2018-12-05 15:27:12.156 [restartedMain] INFO o.s.j.e.a.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
2018-12-05 15:27:12.158 [restartedMain] INFO o.s.j.e.a.AnnotationMBeanExporter - Bean with name 'getDataSource' has been autodetected for JMX exposure
2018-12-05 15:27:12.165 [restartedMain] INFO o.s.j.e.a.AnnotationMBeanExporter - Bean with name 'connectionFactory' has been autodetected for JMX exposure
Любойидея?
Заранее спасибо!