CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-de-codecentric--spring-boot-admin-starter-client

Spring Boot starter that auto-configures a client application to register with Spring Boot Admin server for centralized monitoring and management

Pending
Overview
Eval results
Files

instance-configuration.mddocs/

Instance Configuration

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.

Configuration Properties

Application Identity

@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<>();
}

Service URLs

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;
}

Management URLs

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;
}

Host Resolution

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)
}

Property Configuration Examples

Basic Instance Setup

# 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

Base URL Configuration

# 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

Host Resolution

# 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

Metadata Configuration

# 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-1

YAML Configuration

spring:
  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-1

Auto-Detection Behavior

When URLs are not explicitly configured, Spring Boot Admin Client automatically detects them based on:

  • Service URL: Constructed from server configuration and context path
  • Management URL: Constructed from management server configuration and actuator base path
  • Health URL: Constructed from management URL and health endpoint path

Docker and Cloud Deployment

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/health

Metadata Usage

Metadata is displayed in the Spring Boot Admin UI and can be used for:

  • Environment identification: environment=production
  • Version tracking: version=1.2.3
  • Team assignment: team=backend
  • Geographic location: region=us-east-1
  • Custom tags: Any key-value pairs relevant to your organization

Install with Tessl CLI

npx tessl i tessl/maven-de-codecentric--spring-boot-admin-starter-client

docs

application-registration.md

client-configuration.md

cloud-platform-integration.md

index.md

instance-configuration.md

metadata-management.md

tile.json