or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

application-registration.mdclient-configuration.mdcloud-platform-integration.mdindex.mdinstance-configuration.mdmetadata-management.md

client-configuration.mddocs/

0

# Client Configuration

1

2

The client configuration controls how the Spring Boot application connects to and communicates with Spring Boot Admin servers. All properties are prefixed with `spring.boot.admin.client`.

3

4

## Configuration Properties

5

6

### Server Connection

7

8

```java { .api }

9

@ConfigurationProperties("spring.boot.admin.client")

10

public class ClientProperties {

11

// Server URLs to register with

12

private String[] url = new String[] {};

13

14

// Admin REST API path (default: "instances")

15

private String apiPath = "instances";

16

17

// Time interval between registration attempts (default: 10 seconds)

18

private Duration period = Duration.ofMillis(10_000L);

19

20

// Connection timeout for registration (default: 5 seconds)

21

private Duration connectTimeout = Duration.ofMillis(5_000L);

22

23

// Read timeout for registration (default: 5 seconds)

24

private Duration readTimeout = Duration.ofMillis(5_000L);

25

}

26

```

27

28

### Authentication

29

30

```java { .api }

31

public class ClientProperties {

32

// Username for basic authentication with admin server

33

private String username;

34

35

// Password for basic authentication with admin server

36

private String password;

37

}

38

```

39

40

### Registration Behavior

41

42

```java { .api }

43

public class ClientProperties {

44

// Enable automatic registration when application starts (default: true)

45

private boolean autoRegistration = true;

46

47

// Enable automatic deregistration when application shuts down

48

// Defaults to true if running on a cloud platform

49

private Boolean autoDeregistration = null;

50

51

// Register with one admin server vs all admin servers (default: true)

52

private boolean registerOnce = true;

53

54

// Enable the Spring Boot Admin client entirely (default: true)

55

private boolean enabled = true;

56

}

57

```

58

59

### Key Methods

60

61

```java { .api }

62

public class ClientProperties {

63

// Get admin URLs with API path appended

64

public String[] getAdminUrl();

65

66

// Determine auto-deregistration setting based on environment

67

public boolean isAutoDeregistration(Environment environment);

68

}

69

```

70

71

## Property Configuration Examples

72

73

### Basic Setup

74

75

```properties

76

# Single admin server

77

spring.boot.admin.client.url=http://localhost:8080

78

79

# Multiple admin servers

80

spring.boot.admin.client.url=http://admin1:8080,http://admin2:8080

81

```

82

83

### Authentication

84

85

```properties

86

spring.boot.admin.client.username=admin-user

87

spring.boot.admin.client.password=secret-password

88

```

89

90

### Timeouts and Intervals

91

92

```properties

93

# Check every 30 seconds instead of default 10

94

spring.boot.admin.client.period=30000

95

96

# Longer connection timeout for slow networks

97

spring.boot.admin.client.connect-timeout=10000

98

spring.boot.admin.client.read-timeout=15000

99

```

100

101

### Registration Control

102

103

```properties

104

# Disable automatic registration (manual control)

105

spring.boot.admin.client.auto-registration=false

106

107

# Force auto-deregistration even on non-cloud platforms

108

spring.boot.admin.client.auto-deregistration=true

109

110

# Register with all admin servers instead of just one

111

spring.boot.admin.client.register-once=false

112

```

113

114

### Disabling the Client

115

116

```properties

117

# Completely disable Spring Boot Admin client

118

spring.boot.admin.client.enabled=false

119

```

120

121

## Advanced Configuration

122

123

### Custom API Path

124

125

```properties

126

# Use custom API endpoint on admin server

127

spring.boot.admin.client.api-path=custom-instances

128

```

129

130

### YAML Configuration

131

132

```yaml

133

spring:

134

boot:

135

admin:

136

client:

137

url:

138

- http://admin1:8080

139

- http://admin2:8080

140

username: admin

141

password: secret

142

period: 30s

143

connect-timeout: 10s

144

read-timeout: 15s

145

auto-registration: true

146

auto-deregistration: true

147

register-once: false

148

```