SpringBoot2.0使用health

Stella981
• 阅读 561

1,引入actuator

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

2,application.properties 配置

management.endpoint.health.show-details=always

3,日志如下

 INFO 16764 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
 INFO 16764 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
INFO 16764 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
点赞
收藏
评论区
推荐文章
待兔 待兔
4个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Easter79 Easter79
3年前
springBoot配置activeMq点对点模式消费信息以及独占模式消费如何设置
1、在pom文件中引入对应jar包<!activeMQstart<dependency<groupIdorg.springframework.boot</groupId<artifactIdspringbootstarteractivemq</artifactId
Easter79 Easter79
3年前
spring集成kafka
1、引入依赖jar包<dependency<groupIdorg.springframework.kafka</groupId<artifactIdspringkafka</artifactId</dependency2、配置kafka信息
Easter79 Easter79
3年前
SpringBoot打包成war包
1、添加依赖<dependency<groupIdorg.springframework.boot</groupId<artifactIdspringbootstartertomcat</artifactId<scopeprovided</scope</dependency2
Wesley13 Wesley13
3年前
Java使用Sftp实现对跨服务器上传、下载、打包、写入相关操作
1、Maven引入jar<dependency<groupIdcom.jcraft</groupId<artifactIdjsch</artifactId<version0.1.54</version</dependency2、Test类pac
Stella981 Stella981
3年前
Spring boot 的腾讯企业邮箱发送 实例
1\.引入springbootstartermail依赖包<!支持发送邮件<dependency<groupIdorg.springframework.boot</groupId<artifactIdspringbootstartermail</artifactId
Stella981 Stella981
3年前
SpringBoot集成Spring Security(授权与认证)
⒈添加starter依赖1<dependency2<groupIdorg.springframework.boot</groupId3<artifactIdspringbootstarterweb</artifactId4
Stella981 Stella981
3年前
SpringBoot打包成war包
1、添加依赖<dependency<groupIdorg.springframework.boot</groupId<artifactIdspringbootstartertomcat</artifactId<scopeprovided</scope</dependency2
Easter79 Easter79
3年前
SpringBoot2.0使用health
1,引入actuator<dependency<groupIdorg.springframework.boot</groupId<artifactIdspringbootstarteractuator</artifactId</dependency2,application.prop
Easter79 Easter79
3年前
SpringBoot集成Spring Security(授权与认证)
⒈添加starter依赖1<dependency2<groupIdorg.springframework.boot</groupId3<artifactIdspringbootstarterweb</artifactId4