本文整理汇总了Java中org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint类的典型用法代码示例。如果您正苦于以下问题:Java HealthMvcEndpoint类的具体用法?Java HealthMvcEndpoint怎么用?Java HealthMvcEndpoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HealthMvcEndpoint类属于org.springframework.boot.actuate.endpoint.mvc包,在下文中一共展示了HealthMvcEndpoint类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parameters
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@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 } };
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:22,代码来源:MvcEndpointPathConfigurationTests.java
示例2: testSecureByDefault
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@Test
public void testSecureByDefault() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(TestConfiguration.class);
this.context.refresh();
Health health = (Health) this.context.getBean(HealthMvcEndpoint.class)
.invoke(null);
assertThat(health.getStatus()).isEqualTo(Status.UP);
assertThat(health.getDetails().get("foo")).isNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:HealthMvcEndpointAutoConfigurationTests.java
示例3: testNotSecured
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@Test
public void testNotSecured() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(TestConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context,
"management.security.enabled=false");
this.context.refresh();
Health health = (Health) this.context.getBean(HealthMvcEndpoint.class)
.invoke(null);
assertThat(health.getStatus()).isEqualTo(Status.UP);
Health map = (Health) health.getDetails().get("test");
assertThat(map.getDetails().get("foo")).isEqualTo("bar");
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:15,代码来源:HealthMvcEndpointAutoConfigurationTests.java
示例4: testSecureByDefault
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@Test
public void testSecureByDefault() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(TestConfiguration.class);
this.context.refresh();
Health health = (Health) this.context.getBean(HealthMvcEndpoint.class)
.invoke(null);
assertEquals(Status.UP, health.getStatus());
assertEquals(null, health.getDetails().get("foo"));
}
示例5: testNotSecured
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@Test
public void testNotSecured() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(TestConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context,
"management.security.enabled=false");
this.context.refresh();
Health health = (Health) this.context.getBean(HealthMvcEndpoint.class)
.invoke(null);
assertEquals(Status.UP, health.getStatus());
Health map = (Health) health.getDetails().get("test");
assertEquals("bar", map.getDetails().get("foo"));
}
示例6: healthEndpointDisabled
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@Test
public void healthEndpointDisabled() throws Exception {
endpointDisabled("health", HealthMvcEndpoint.class);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:EndpointWebMvcAutoConfigurationTests.java
示例7: healthEndpointEnabledOverride
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@Test
public void healthEndpointEnabledOverride() throws Exception {
endpointEnabledOverride("health", HealthMvcEndpoint.class);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:EndpointWebMvcAutoConfigurationTests.java
示例8: healthMvcEndpoint
import org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint; //导入依赖的package包/类
@Bean
@Autowired
public HealthMvcEndpoint healthMvcEndpoint(HealthEndpoint delegate) {
return new HealthMvcEndpoint(delegate, true);
}