@Configuration @ConditionalOnClass(value={, }) @ConditionalOnWebApplication public class EndpointWebMvcAutoConfiguration extends Object implements ApplicationContextAware, ApplicationListener<ContextRefreshedEvent>
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 |
---|---|
EndpointHandlerMapping |
endpointHandlerMapping() |
EnvironmentMvcEndpoint |
environmentMvcEndpoint(EnvironmentEndpoint delegate) |
MetricsMvcEndpoint |
metricsMvcEndpoint(MetricsEndpoint delegate) |
MvcEndpoints |
mvcEndpoints() |
void |
onApplicationEvent(ContextRefreshedEvent event) |
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 onApplicationEvent(ContextRefreshedEvent event)
onApplicationEvent
in interface ApplicationListener<ContextRefreshedEvent>
@Bean @ConditionalOnMissingBean public MvcEndpoints mvcEndpoints()
@Bean @ConditionalOnBean(value=EnvironmentEndpoint.class) public EnvironmentMvcEndpoint environmentMvcEndpoint(EnvironmentEndpoint delegate)
@Bean @ConditionalOnBean(value=MetricsEndpoint.class) public MetricsMvcEndpoint metricsMvcEndpoint(MetricsEndpoint delegate)
@Bean @ConditionalOnBean(value=ShutdownEndpoint.class) public ShutdownMvcEndpoint shutdownMvcEndpoint(ShutdownEndpoint delegate)
Copyright © 2014. All rights reserved.