@Configuration @ConditionalOnClass(value={javax.servlet.Servlet.class,org.springframework.web.servlet.DispatcherServlet.class}) @ConditionalOnWebApplication @EnableConfigurationProperties(value={HealthMvcEndpointProperties.class,EndpointCorsProperties.class}) public class EndpointWebMvcAutoConfiguration extends Object implements ApplicationContextAware, SmartInitializingSingleton
Auto-configuration
to enable Spring MVC to handle
Endpoint
requests. If the ManagementServerProperties
specifies a
different port to ServerProperties
a new child context is created, otherwise it
is assumed that endpoint requests will be mapped and handled via an already registered
DispatcherServlet
.Modifier and Type | Class and Description |
---|---|
protected static class |
EndpointWebMvcAutoConfiguration.ApplicationContextFilterConfiguration |
protected static class |
EndpointWebMvcAutoConfiguration.ManagementServerPort |
Constructor and Description |
---|
EndpointWebMvcAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
afterSingletonsInstantiated() |
EndpointHandlerMapping |
endpointHandlerMapping() |
EnvironmentMvcEndpoint |
environmentMvcEndpoint(EnvironmentEndpoint delegate) |
HealthMvcEndpoint |
healthMvcEndpoint(HealthEndpoint delegate) |
MetricsMvcEndpoint |
metricsMvcEndpoint(MetricsEndpoint delegate) |
MvcEndpoints |
mvcEndpoints() |
void |
setApplicationContext(ApplicationContext applicationContext) |
ShutdownMvcEndpoint |
shutdownMvcEndpoint(ShutdownEndpoint delegate) |
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
@Bean @ConditionalOnMissingBean public EndpointHandlerMapping endpointHandlerMapping()
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface SmartInitializingSingleton
@Bean @ConditionalOnMissingBean public MvcEndpoints mvcEndpoints()
@Bean @ConditionalOnBean(value=EnvironmentEndpoint.class) public EnvironmentMvcEndpoint environmentMvcEndpoint(EnvironmentEndpoint delegate)
@Bean @ConditionalOnBean(value=HealthEndpoint.class) public HealthMvcEndpoint healthMvcEndpoint(HealthEndpoint delegate)
@Bean @ConditionalOnBean(value=MetricsEndpoint.class) public MetricsMvcEndpoint metricsMvcEndpoint(MetricsEndpoint delegate)
@Bean @ConditionalOnBean(value=ShutdownEndpoint.class) public ShutdownMvcEndpoint shutdownMvcEndpoint(ShutdownEndpoint delegate)
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.