The management.endpoints.web.exposure.include property lists which Spring Boot Actuator endpoints are reachable over HTTP. Actuator creates many endpoints, but only health is exposed on the web by default, so you use this property to add the ones you need, such as info, metrics or prometheus, and keep sensitive ones such as env and heapdump hidden.
It controls exposure only. An endpoint must also be enabled (accessible) and, in production, protected by authentication.
Actuator endpoints have two independent switches: whether the endpoint is available at all, and whether it is exposed over a given technology (HTTP or JMX). management.endpoints.web.exposure.include and its counterpart exclude handle the HTTP exposure. The JMX equivalent is management.endpoints.jmx.exposure.include.
By default Spring Boot exposes only health over HTTP, at /actuator/health. Everything else returns 404 until you include it. This is a deliberate secure-by-default choice, because endpoints like env, beans, configprops and heapdump can reveal configuration, class structure or even memory contents.
In application.properties, list endpoint ids separated by commas:
The same in application.yml:
Expose everything with the wildcard. In YAML the asterisk must be quoted, because an unquoted * is a YAML alias character and fails to parse:
exclude always wins over include. The combination above exposes all endpoints except three risky ones, which is a safer way to use the wildcard.
After this change, the available paths look like this:
Endpoint ids such as prometheus also need their supporting dependency (here micrometer-registry-prometheus) on the classpath, otherwise the endpoint does not exist even though it is included.
| Endpoint id | Shows | Risk if public |
|---|---|---|
health | Application and dependency status | Low, but hide details |
info | Build and custom info | Low |
metrics | Metric names and values | Medium |
prometheus | Metrics for scraping | Medium |
loggers | Log levels, allows changing them | Medium to high |
env and configprops | Properties (values are sanitized by default) | High |
beans and mappings | Internal structure of the app | Medium |
heapdump and threaddump | Memory and thread contents | Very high |
shutdown | Stops the application | Very high |
Sensitive values in env and configprops are masked unless you change management.endpoint.env.show-values, but treat those endpoints as private anyway.
Exposure is only half of the picture. Boot 3.4 and later control whether an endpoint can be used with the access setting, for example management.endpoint.shutdown.access=none or management.endpoints.access.default=read-only. Older versions use management.endpoint.<id>.enabled=true|false for the same purpose.
The shutdown endpoint is a good example: even with include: "*" it does nothing unless it is explicitly enabled. An endpoint must be both exposed and accessible to respond.
The health endpoint has its own detail setting. By default it shows only the overall status to unauthenticated users:
The second line adds the /actuator/health/liveness and /actuator/health/readiness groups used by Kubernetes probes. (Boot enables them automatically when it detects a Kubernetes environment.)
For anything beyond local development, combine the property with network and authentication controls:
"*" without an exclude list in production.EndpointRequest matchers.management.server.port=9090 and keep that port off the public network.management.endpoints.web.base-path=/manage), but treat that as tidiness, not security.This permits unauthenticated access to health and info and requires the OPS role for every other exposed endpoint.
Because metrics is not in the web exposure list. Add it to management.endpoints.web.exposure.include and restart.
Not on its own. Use it only with an exclude list for dangerous endpoints, plus authentication and a restricted network. Listing the required endpoints explicitly is safer.
Exposure decides over which channel (HTTP or JMX) an endpoint is reachable. Enablement or access decides whether the endpoint works at all. You need both.
No. JMX has its own management.endpoints.jmx.exposure.include property.
management.endpoints.web.exposure.include is the allow-list for Actuator's HTTP endpoints. Spring Boot exposes only health by default. Add the endpoints you actually need, use exclude to hold back dangerous ones, quote the wildcard in YAML, and put authentication or a private management port in front of anything sensitive.