I am using Spring Actuator (version 2.2.4.RELEASE) to generate a health check endpoint at /localhost:8080/my-app/actuator/health
which works correctly.
This generates 3 endpoints shown when visiting /actuator
and shown in Swagger (version 2):
/actuator/health
/actuator/health/{*path}
(in my swagger page, this is appearing as/actuator/health/**
)/actuator/info
Because of AWS reasons, I am having issues with the health/**
and would like to remove it (and I want to remove /info
too as I have no need for it).
I have tried adding the following things to my application.properties
file:
management.endpoints.web.exposure.exclude=health,info
and
management.endpoints.jmx.exposure.exclude=health,info
but it doesn't make any difference (they are still generated). I have tried using *
to see if that forces all endpoints to disappear but it doesn't change anything either.
Any idea how I can resolved this issue?
EDIT 1
I found that a properties file was being overwritten by another. So, using the following commands:
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
Gets rid of the /actuator/info
endpoint. However, I still need to get rid of the the /actuator/health/{*path}
and keep the /actuator/health
endpoint.