📚 Cheatsheet

Une collection organisée de snippets de code pour accélérer votre développement. Parcourez, recherchez et copiez en un clic.

Snippets 5

Retour
Dépendance 'spring-boot-starter-actuator'
Facile
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Endpoint 'health'
Facile
# Accéder à /actuator/health
Endpoint 'info'
Facile
# application.properties
info.app.name=Mon Application
info.app.version=1.0.0
Exposer tous les endpoints Actuator
Facile
# application.properties
management.endpoints.web.exposure.include=*
Personnaliser l'indicateur de santé
Avancé
@Component
public class MyHealthIndicator implements HealthIndicator {
    @Override
    public Health health() {
        // ... logique de vérification
        return Health.up().build();
    }
}