标签:ati contex mapped tab logger 出现 报告 produces post
1.新增spring-boot-starter-actuator
的依赖
gradle:
compile(‘org.springframework.boot:spring-boot-actuator‘)
maven:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
2.重启项目
控制台会出现端点监控如下:
2018-06-22 11:13:27.648 INFO [wolong-member-provider,,,] 8684 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/reset],methods=[POST]}" onto public java.util.Map<java.lang.String, java.lang.Object> org.springframework.cloud.context.environment.EnvironmentManagerMvcEndpoint.reset() 2018-06-22 11:13:27.653 INFO [wolong-member-provider,,,] 8684 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/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-06-22 11:13:27.654 INFO [wolong-member-provider,,,] 8684 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/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-06-22 11:13:27.654 INFO [wolong-member-provider,,,] 8684 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers || /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-06-22 11:13:27.654 INFO [wolong-member-provider,,,] 8684 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/refresh || /refresh.json],methods=[POST]}" onto public java.lang.Object org.springframework.cloud.endpoint.GenericPostableMvcEndpoint.invoke()
3.端点介绍
原生端点
根据端点的作用来说,我们可以原生端点分为三大类:
参考:http://blog.didispace.com/spring-boot-actuator-1/
标签:ati contex mapped tab logger 出现 报告 produces post
原文地址:https://www.cnblogs.com/soul-wonder/p/9212579.html