@Parameters(name = "{0}") public static Object[] parameters() { return new Object[] { new Object[] { "actuator", HalJsonMvcEndpoint.class }, new Object[] { "autoconfig", AutoConfigurationReportEndpoint.class }, new Object[] { "beans", BeansEndpoint.class }, new Object[] { "configprops", ConfigurationPropertiesReportEndpoint.class }, new Object[] { "docs", DocsMvcEndpoint.class }, new Object[] { "dump", DumpEndpoint.class }, new Object[] { "env", EnvironmentMvcEndpoint.class }, new Object[] { "flyway", FlywayEndpoint.class }, new Object[] { "health", HealthMvcEndpoint.class }, new Object[] { "info", InfoEndpoint.class }, new Object[] { "jolokia", JolokiaMvcEndpoint.class }, new Object[] { "liquibase", LiquibaseEndpoint.class }, new Object[] { "logfile", LogFileMvcEndpoint.class }, new Object[] { "mappings", RequestMappingEndpoint.class }, new Object[] { "metrics", MetricsMvcEndpoint.class }, new Object[] { "shutdown", ShutdownEndpoint.class }, new Object[] { "trace", TraceEndpoint.class } }; }
@Test public void endpoints() throws Exception { load(EndpointAutoConfiguration.class); assertThat(this.context.getBean(BeansEndpoint.class)).isNotNull(); assertThat(this.context.getBean(DumpEndpoint.class)).isNotNull(); assertThat(this.context.getBean(EnvironmentEndpoint.class)).isNotNull(); assertThat(this.context.getBean(HealthEndpoint.class)).isNotNull(); assertThat(this.context.getBean(InfoEndpoint.class)).isNotNull(); assertThat(this.context.getBean(MetricsEndpoint.class)).isNotNull(); assertThat(this.context.getBean(ShutdownEndpoint.class)).isNotNull(); assertThat(this.context.getBean(TraceEndpoint.class)).isNotNull(); assertThat(this.context.getBean(RequestMappingEndpoint.class)).isNotNull(); }
@Test public void endpoints() throws Exception { load(EndpointAutoConfiguration.class); assertNotNull(this.context.getBean(BeansEndpoint.class)); assertNotNull(this.context.getBean(DumpEndpoint.class)); assertNotNull(this.context.getBean(EnvironmentEndpoint.class)); assertNotNull(this.context.getBean(HealthEndpoint.class)); assertNotNull(this.context.getBean(InfoEndpoint.class)); assertNotNull(this.context.getBean(MetricsEndpoint.class)); assertNotNull(this.context.getBean(ShutdownEndpoint.class)); assertNotNull(this.context.getBean(TraceEndpoint.class)); assertNotNull(this.context.getBean(RequestMappingEndpoint.class)); }
@Bean @ConditionalOnBean(ShutdownEndpoint.class) @ConditionalOnEnabledEndpoint(value = "shutdown", enabledByDefault = false) public ShutdownMvcEndpoint shutdownMvcEndpoint(ShutdownEndpoint delegate) { return new ShutdownMvcEndpoint(delegate); }
@Bean @ConditionalOnMissingBean public ShutdownEndpoint shutdownEndpoint() { return new ShutdownEndpoint(); }
protected EndpointMBean getEndpointMBean(String beanName, Endpoint<?> endpoint) { if (endpoint instanceof ShutdownEndpoint) { return new ShutdownEndpointMBean(beanName, endpoint, this.objectMapper); } return new DataEndpointMBean(beanName, endpoint, this.objectMapper); }
public ShutdownMvcEndpoint(ShutdownEndpoint delegate) { super(delegate); }