use of org.springframework.boot.actuate.endpoint.mvc.MvcEndpoints in project spring-boot by spring-projects.
the class LinksEnhancerTests method getLinksEnhancer.
private LinksEnhancer getLinksEnhancer(List<MvcEndpoint> endpoints) throws Exception {
StaticWebApplicationContext context = new StaticWebApplicationContext();
for (MvcEndpoint endpoint : endpoints) {
context.getDefaultListableBeanFactory().registerSingleton(endpoint.toString(), endpoint);
}
MvcEndpoints mvcEndpoints = new MvcEndpoints();
mvcEndpoints.setApplicationContext(context);
mvcEndpoints.afterPropertiesSet();
return new LinksEnhancer("", mvcEndpoints);
}
Aggregations