use of org.springframework.boot.actuate.endpoint.web.WebServerNamespace in project spring-boot by spring-projects.
the class AdditionalHealthEndpointPath method from.
/**
* Creates an {@link AdditionalHealthEndpointPath} from the given input. The input
* must contain a prefix and value separated by a `:`. The value must be limited to
* one path segment. For example, `server:/healthz`.
* @param value the value to parse
* @return the new instance
*/
public static AdditionalHealthEndpointPath from(String value) {
Assert.hasText(value, "Value must not be null");
String[] values = value.split(":");
Assert.isTrue(values.length == 2, "Value must contain a valid namespace and value separated by ':'.");
Assert.isTrue(StringUtils.hasText(values[0]), "Value must contain a valid namespace.");
WebServerNamespace namespace = WebServerNamespace.from(values[0]);
validateValue(values[1]);
return new AdditionalHealthEndpointPath(namespace, values[1]);
}
use of org.springframework.boot.actuate.endpoint.web.WebServerNamespace in project spring-boot by spring-projects.
the class CachingOperationInvoker method getCacheKey.
private CacheKey getCacheKey(InvocationContext context) {
ApiVersion contextApiVersion = context.resolveArgument(ApiVersion.class);
Principal principal = context.resolveArgument(Principal.class);
WebServerNamespace serverNamespace = context.resolveArgument(WebServerNamespace.class);
return new CacheKey(contextApiVersion, principal, serverNamespace);
}
Aggregations