Skip to content

Commit c539e62

Browse files
committed
Add isPreferIp() for correct metadata and fix docs
1 parent 209756b commit c539e62

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

spring-boot-admin-starter-client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The main service that is used is a registrar that registeres the application at
2121
| spring.boot.admin.client.managementUrl | Client-management-URL to register with. Can be overriden in case the reachable URL is different (e.g. Docker). Must be unique in registry.<br>Default: is guessed based on serviceUrl management.port and management.context-path|
2222
| spring.boot.admin.client.healthUrl | Client-management-URL to register with. Can be overriden in case the reachable URL is different (e.g. Docker). Must be unique in registry.<br>Default: is guessed based on managementUrl and endpoints.health.id |
2323
| spring.boot.admin.client.name | Name to register with. Defaults to the ApplicationContexts name. Only set when it should differ.<br>Default: _${spring.application.name}_ if set, spring-boot-application otherwise. |
24-
| spring.boot.admin.client.preferIpAddress | Use the ip-address rather then the hostname in the guessed urls. It's required to set `server.address` and `management.address`respectively. |
24+
| spring.boot.admin.client.preferIp | Use the ip-address rather then the hostname in the guessed urls. It's required to set `server.address` and `management.address`respectively. |
2525

2626
### Other configuration properties
2727
Options from other spring boot features. These should be set to enable all features.

spring-boot-admin-starter-client/src/main/java/de/codecentric/boot/admin/config/AdminClientProperties.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ public void setPreferIp(boolean preferIp) {
184184
this.preferIp = preferIp;
185185
}
186186

187+
public boolean isPreferIp() {
188+
return preferIp;
189+
}
190+
187191
private String createLocalUri(String host, int port) {
188192
String scheme = server.getSsl() != null && server.getSsl().isEnabled() ? "https" : "http";
189193
return scheme + "://" + host + ":" + port;

0 commit comments

Comments
 (0)