Actuator-Endpunkte aktivieren
Fügen Sie Actuator-Endpunkte hinzu und machen Sie sie verfügbar.
Actuator-Endpunkte aktivieren ist eine kostenlose Spring Boot 4 Microservices & REST APIs-Lektion auf CoddyKit. Dies ist Lektion 1 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Spring Boot 4 Microservices & REST APIs-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Spring Boot 4 Microservices & REST APIs-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
What Actuator Provides
Spring Boot Actuator adds production-ready endpoints that expose the internal state of your running app: health, metrics, environment, beans, mappings, and more.
It turns a black-box service into something you can observe and operate without writing custom plumbing.
Adding the Starter
Enable Actuator by adding a single dependency. Auto-configuration registers the endpoints; no extra code is required.
<!-- pom.xml -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>The /actuator Base Path
By default endpoints live under /actuator. Visiting the base path returns a discovery document listing the exposed endpoints and their links.
GET /actuator
# returns links to exposed endpoints: health, info, ...Default Exposure
Out of the box, only a few endpoints are exposed over HTTP — most notably health. Others exist but are hidden until you opt in, which is a safe default for production.
Exposing More Endpoints
Control HTTP exposure with management.endpoints.web.exposure.include. List specific endpoints by id, or use * to expose all (use with care).
management:
endpoints:
web:
exposure:
include: health,info,metrics,envExcluding Endpoints
You can include broadly and then carve out sensitive endpoints with exclude, which takes precedence over include.
management:
endpoints:
web:
exposure:
include: "*"
exclude: env,beans,heapdumpEnabling and Disabling Endpoints
Exposure differs from being enabled. An endpoint can be enabled but not exposed. Toggle availability with management.endpoint.<id>.enabled.
management:
endpoint:
shutdown:
enabled: true # disabled by default
health:
enabled: trueThe Info Endpoint
The info endpoint surfaces arbitrary metadata about your build. Populate it from application.yml or build-time properties like git and build info.
info:
app:
name: orders-service
version: 2.4.0
management:
info:
env:
enabled: trueChanging the Base Path
You can relocate endpoints by changing management.endpoints.web.base-path, for example to /manage, to fit gateway or routing conventions.
management:
endpoints:
web:
base-path: /manage
# now: /manage/healthA Separate Management Port
For isolation, run Actuator on its own port with management.server.port. This lets you keep operational endpoints off the public application port entirely.
management:
server:
port: 8081Operational Mindset
Actuator is the foundation of observability. Expose what operators need, hide what attackers could abuse, and treat the management surface as part of your security perimeter.
Quick Check
Test your understanding of exposure.
Recap
Actuator makes your app observable.
- Add
spring-boot-starter-actuator - Endpoints live under
/actuator; onlyhealthis exposed by default - Control HTTP exposure with
exposure.include/exclude - Enable/disable endpoints individually
- Optionally use a separate management port
Häufig gestellte Fragen
Ist die Lektion „Actuator-Endpunkte aktivieren“ kostenlos?
Ja — der vollständige Text von „Actuator-Endpunkte aktivieren“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Spring Boot 4 Microservices & REST APIs-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Spring Boot 4 Microservices & REST APIs-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Actuator-Endpunkte aktivieren“?
Fügen Sie Actuator-Endpunkte hinzu und machen Sie sie verfügbar. Du übst Spring Boot 4 Microservices & REST APIs mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Spring Boot 4 Microservices & REST APIs zu starten?
Keine Vorkenntnisse erforderlich. Spring Boot 4 Microservices & REST APIs auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 1 von 4.
Wie lange dauert die Lektion „Actuator-Endpunkte aktivieren“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Spring Boot 4 Microservices & REST APIs-Lektion Code schreiben und ausführen?
Ja. Jede Spring Boot 4 Microservices & REST APIs-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Actuator-Endpunkte aktivieren
- Health-Indikatoren
- Benutzerdefinierte Metriken mit Micrometer
- Actuator-Endpunkte absichern