Spring Boot starter that auto-configures a client application to register with Spring Boot Admin server for centralized monitoring and management
—
Instance configuration controls how the Spring Boot application identifies itself to the admin server, including URLs, metadata, and service discovery settings. All properties are prefixed with spring.boot.admin.client.instance.
@ConfigurationProperties("spring.boot.admin.client.instance")
public class InstanceProperties {
// Application name (defaults to spring.application.name)
@Value("${spring.application.name:spring-boot-application}")
private String name = "spring-boot-application";
// Additional metadata to associate with this application
private Map<String, String> metadata = new LinkedHashMap<>();
}public class InstanceProperties {
// Complete service URL (overrides auto-detection)
private String serviceUrl;
// Base URL for service (path auto-detected)
private String serviceBaseUrl;
// Service path (defaults to "/")
private String servicePath;
}public class InstanceProperties {
// Complete management URL (overrides auto-detection)
private String managementUrl;
// Base URL for management endpoints (path auto-detected)
private String managementBaseUrl;
// Health endpoint URL (overrides auto-detection)
private String healthUrl;
}public class InstanceProperties {
// How to resolve hostname for URLs (deprecated - use serviceHostType)
@Deprecated
private boolean preferIp = false;
// Host type for building URLs
private ServiceHostType serviceHostType = ServiceHostType.CANONICAL_HOST_NAME;
}
public enum ServiceHostType {
IP, // Use IP address
HOST_NAME, // Use hostname
CANONICAL_HOST_NAME // Use canonical hostname (default)
}# Application name
spring.boot.admin.client.instance.name=user-service
# Custom service URLs (useful for Docker/cloud deployments)
spring.boot.admin.client.instance.service-url=https://my-service.example.com
spring.boot.admin.client.instance.management-url=https://my-service.example.com/actuator
spring.boot.admin.client.instance.health-url=https://my-service.example.com/actuator/health# Let Spring Boot Admin construct the full URLs
spring.boot.admin.client.instance.service-base-url=https://my-service.example.com
spring.boot.admin.client.instance.management-base-url=https://my-service.example.com
# Optional: custom service path
spring.boot.admin.client.instance.service-path=/api# Use IP address instead of hostname
spring.boot.admin.client.instance.service-host-type=IP
# Use simple hostname
spring.boot.admin.client.instance.service-host-type=HOST_NAME
# Use canonical hostname (default)
spring.boot.admin.client.instance.service-host-type=CANONICAL_HOST_NAME# Add custom metadata
spring.boot.admin.client.instance.metadata.environment=production
spring.boot.admin.client.instance.metadata.version=1.2.3
spring.boot.admin.client.instance.metadata.team=backend
spring.boot.admin.client.instance.metadata.region=us-east-1spring:
boot:
admin:
client:
instance:
name: user-service
service-url: https://my-service.example.com
management-url: https://my-service.example.com/actuator
health-url: https://my-service.example.com/actuator/health
service-host-type: CANONICAL_HOST_NAME
metadata:
environment: production
version: 1.2.3
team: backend
region: us-east-1When URLs are not explicitly configured, Spring Boot Admin Client automatically detects them based on:
For containerized deployments where internal and external URLs differ:
# External URLs that the admin server can reach
spring.boot.admin.client.instance.service-base-url=https://my-service.example.com
spring.boot.admin.client.instance.management-base-url=https://my-service.example.com
# Or complete URLs
spring.boot.admin.client.instance.service-url=https://my-service.example.com/api
spring.boot.admin.client.instance.management-url=https://my-service.example.com/actuator
spring.boot.admin.client.instance.health-url=https://my-service.example.com/actuator/healthMetadata is displayed in the Spring Boot Admin UI and can be used for:
environment=productionversion=1.2.3team=backendregion=us-east-1Install with Tessl CLI
npx tessl i tessl/maven-de-codecentric--spring-boot-admin-starter-client