Example usage for org.springframework.boot.autoconfigure.web ServerProperties getPort

List of usage examples for org.springframework.boot.autoconfigure.web ServerProperties getPort

Introduction

In this page you can find the example usage for org.springframework.boot.autoconfigure.web ServerProperties getPort.

Prototype

public Integer getPort() 

Source Link

Usage

From source file:org.springframework.boot.actuate.hypermedia.autoconfigure.EndpointHypermediaAutoConfiguration.java

@Bean
@ConditionalOnBean(ActuatorDocsEndpoint.class)
@ConditionalOnMissingBean(CurieProvider.class)
@ConditionalOnProperty(value = "endpoints.docs.curies.enabled", matchIfMissing = false)
public DefaultCurieProvider curieProvider(ServerProperties server, ManagementServerProperties management,
        ActuatorDocsEndpoint endpoint) {
    String path = management.getContextPath() + endpoint.getPath() + "/#spring_boot_actuator__{rel}";
    if (server.getPort() == management.getPort() && management.getPort() != null && management.getPort() != 0) {
        path = server.getPath(path);/*from  ww  w .ja  va 2s .c o m*/
    }
    return new DefaultCurieProvider("boot", new UriTemplate(path));
}