Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does springboot disable a health check?

Shulou Source: shulou.com Published: 2022-05-31 13:38:28 09月24日 Update

Today, I would like to share with you the relevant knowledge points about how to disable a certain health examination by springboot. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

Springboot disables a health check management.health.mail.enabledmanagement.health.mongo.enabledmanagement.health.redis.enabledmanagement.health.solr.enabledmanagement.health.elasticsearch.enabledspringboot plus es health check problem

The code customizes the health check path / actuator/health

But I can't get into my own code when I actually ask for it.

It will be intercepted by filter. After the interception, it will fail the health check of calling es and return 503.

Solution:

In application.yaml

Management

Endpoints

Exposure

Exclude: health

Exclude health and follow the health check interface written by yourself.

These are all the contents of the article "how to disable a certain health check in springboot". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Health inspection knowledge articles code content different big methods most actually that is interfaces time more knowledge points industry information channels paths Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Technology Linux OPPO Reno MariaDB