<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
{
"status": "UP",
"diskSpace": {
"status": "UP",
"total": 491270434816,
"free": 383870214144,
"threshold": 10485760
}
}
{
"positiveMatches": { // 条件匹配成功的
"EndpointWebMvcAutoConfiguration": [
{
"condition": "OnClassCondition",
"message": "@ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet"
},
{
"condition": "OnWebApplicationCondition",
"message": "found web application StandardServletEnvironment"
}
],
...
},
"negativeMatches": { // 条件不匹配成功的
"HealthIndicatorAutoConfiguration.DataSourcesHealthIndicatorConfiguration": [
{
"condition": "OnClassCondition",
"message": "required @ConditionalOnClass classes not found: org.springframework.jdbc.core.JdbcTemplate"
}
],
...
}
}
[
{
"context": "hello:dev:8881",
"parent": null,
"beans": [
{
"bean": "org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletConfiguration",
"scope": "singleton",
"type": "org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration$DispatcherServletConfiguration$$EnhancerBySpringCGLIB$$3440282b",
"resource": "null",
"dependencies": [
"serverProperties",
"spring.mvc.CONFIGURATION_PROPERTIES",
"multipartConfigElement"
]
},
{
"bean": "dispatcherServlet",
"scope": "singleton",
"type": "org.springframework.web.servlet.DispatcherServlet",
"resource": "class path resource [org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration$DispatcherServletConfiguration.class]",
"dependencies": []
}
]
}
]
{
"configurationPropertiesReportEndpoint": {
"prefix": "endpoints.configprops",
"properties": {
"id": "configprops",
"sensitive": true,
"enabled": true
}
},
...
}
{
"profiles": [
"dev"
],
"server.ports": {
"local.server.port": 8881
},
"servletContextInitParams": {
},
"systemProperties": {
"idea.version": "2016.1.3",
"java.runtime.name": "Java(TM) SE Runtime Environment",
"sun.boot.library.path": "C:\\Program Files\\Java\\jdk1.8.0_91\\jre\\bin",
"java.vm.version": "25.91-b15",
"java.vm.vendor": "Oracle Corporation",
...
},
"systemEnvironment": {
"configsetroot": "C:\\WINDOWS\\ConfigSetRoot",
"RABBITMQ_BASE": "E:\\tools\\rabbitmq",
...
},
"applicationConfig: [classpath:/application-dev.properties]": {
"server.port": "8881"
},
"applicationConfig: [classpath:/application.properties]": {
"server.port": "8885",
"spring.profiles.active": "dev",
"info.app.name": "spring-boot-hello",
"info.app.version": "v1.0.0",
"spring.application.name": "hello"
}
}
{
"/webjars/**": {
"bean": "resourceHandlerMapping"
},
"/**": {
"bean": "resourceHandlerMapping"
},
"/**/favicon.ico": {
"bean": "faviconHandlerMapping"
},
"{[/hello]}": {
"bean": "requestMappingHandlerMapping",
"method": "public java.lang.String com.didispace.web.HelloController.index()"
},
"{[/mappings || /mappings.json],methods=[GET],produces=[application/json]}": {
"bean": "endpointHandlerMapping",
"method": "public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()"
},
...
}
info.app.name=spring-boot-hello info.app.version=v1.0.0
{
"app": {
"name": "spring-boot-hello",
"version": "v1.0.0"
}
}
{
"mem": 541305,
"mem.free": 317864,
"processors": 8,
"instance.uptime": 33376471,
"uptime": 33385352,
"systemload.average": -1,
"heap.committed": 476672,
"heap.init": 262144,
"heap.used": 158807,
"heap": 3701248,
"nonheap.committed": 65856,
"nonheap.init": 2496,
"nonheap.used": 64633,
"nonheap": 0,
"threads.peak": 22,
"threads.daemon": 20,
"threads.totalStarted": 26,
"threads": 22,
"classes": 7669,
"classes.loaded": 7669,
"classes.unloaded": 0,
"gc.ps_scavenge.count": 7,
"gc.ps_scavenge.time": 118,
"gc.ps_marksweep.count": 2,
"gc.ps_marksweep.time": 234,
"httpsessions.max": -1,
"httpsessions.active": 0,
"gauge.response.beans": 55,
"gauge.response.env": 10,
"gauge.response.hello": 5,
"gauge.response.metrics": 4,
"gauge.response.configprops": 153,
"gauge.response.star-star": 5,
"counter.status.200.beans": 1,
"counter.status.200.metrics": 3,
"counter.status.200.configprops": 1,
"counter.status.404.star-star": 2,
"counter.status.200.hello": 11,
"counter.status.200.env": 1
}
@RestController
public class HelloController {
@Autowired
private CounterService counterService;
@RequestMapping("/hello")
public String greet() {
counterService.increment("didispace.hello.count");
return "";
}
}
@Component
public class RocketMQHealthIndicator implements HealthIndicator {
@Override
public Health health() {
int errorCode = check();
if (errorCode != 0) {
return Health.down().withDetail("Error Code", errorCode).build();
}
return Health.up().build();
}
private int check() {
// 对监控对象的检测操作
}
}
"rocketMQ": {
"status": "UP"
}
[
{
"timestamp": 1482570022463,
"info": {
"method": "GET",
"path": "/metrics/mem",
"headers": {
"request": {
"host": "localhost:8881",
"connection": "keep-alive",
"cache-control": "no-cache",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36",
"postman-token": "9817ea4d-ad9d-b2fc-7685-9dff1a1bc193",
"accept": "*/*",
"accept-encoding": "gzip, deflate, sdch",
"accept-language": "zh-CN,zh;q=0.8"
},
"response": {
"X-Application-Context": "hello:dev:8881",
"Content-Type": "application/json;charset=UTF-8",
"Transfer-Encoding": "chunked",
"Date": "Sat, 24 Dec 2016 09:00:22 GMT",
"status": "200"
}
}
}
},
...
]
endpoints.shutdown.enabled=true
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有