Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Add isPreferIp() for correct metadata and fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Oct 20, 2015
1 parent 209756b commit c539e62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spring-boot-admin-starter-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The main service that is used is a registrar that registeres the application at
| 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|
| 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 |
| 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. |
| 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. |
| 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. |

### Other configuration properties
Options from other spring boot features. These should be set to enable all features.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ public void setPreferIp(boolean preferIp) {
this.preferIp = preferIp;
}

public boolean isPreferIp() {
return preferIp;
}

private String createLocalUri(String host, int port) {
String scheme = server.getSsl() != null && server.getSsl().isEnabled() ? "https" : "http";
return scheme + "://" + host + ":" + port;
Expand Down

0 comments on commit c539e62

Please sign in to comment.