本文整理匯總了Java中org.springframework.boot.autoconfigure.web.ServerProperties.getPath方法的典型用法代碼示例。如果您正苦於以下問題:Java ServerProperties.getPath方法的具體用法?Java ServerProperties.getPath怎麽用?Java ServerProperties.getPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.boot.autoconfigure.web.ServerProperties
的用法示例。
在下文中一共展示了ServerProperties.getPath方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getRequestMatcher
import org.springframework.boot.autoconfigure.web.ServerProperties; //導入方法依賴的package包/類
public static RequestMatcher getRequestMatcher(
ManagementContextResolver contextResolver) {
if (contextResolver == null) {
return null;
}
ManagementServerProperties management = contextResolver
.getApplicationContext().getBean(ManagementServerProperties.class);
ServerProperties server = contextResolver.getApplicationContext()
.getBean(ServerProperties.class);
String path = management.getContextPath();
if (StringUtils.hasText(path)) {
AntPathRequestMatcher matcher = new AntPathRequestMatcher(
server.getPath(path) + "/**");
return matcher;
}
// Match everything, including the sensitive and non-sensitive paths
return new LazyEndpointPathRequestMatcher(contextResolver, EndpointPaths.ALL);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:19,代碼來源:ManagementWebSecurityAutoConfiguration.java
示例2: curieProvider
import org.springframework.boot.autoconfigure.web.ServerProperties; //導入方法依賴的package包/類
@Bean
@ConditionalOnBean(DocsMvcEndpoint.class)
@ConditionalOnMissingBean(CurieProvider.class)
@ConditionalOnProperty(prefix = "endpoints.docs.curies", name = "enabled", matchIfMissing = false)
public DefaultCurieProvider curieProvider(ServerProperties server,
ManagementServerProperties management, DocsMvcEndpoint endpoint) {
String path = management.getContextPath() + endpoint.getPath()
+ "/#spring_boot_actuator__{rel}";
if (server.getPort().equals(management.getPort()) && management.getPort() != 0) {
path = server.getPath(path);
}
return new DefaultCurieProvider("boot", new UriTemplate(path));
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:14,代碼來源:EndpointWebMvcHypermediaManagementContextConfiguration.java
示例3: curieProvider
import org.springframework.boot.autoconfigure.web.ServerProperties; //導入方法依賴的package包/類
@Bean
@ConditionalOnBean(ActuatorDocsEndpoint.class)
@ConditionalOnMissingBean(CurieProvider.class)
@ConditionalOnProperty(prefix = "endpoints.docs.curies", name = "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);
}
return new DefaultCurieProvider("boot", new UriTemplate(path));
}
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:15,代碼來源:EndpointWebMvcHypermediaManagementContextConfiguration.java