当前位置: 首页>>代码示例>>Java>>正文


Java HealthMvcEndpoint类代码示例

本文整理汇总了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"));
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:12,代码来源:HealthMvcEndpointAutoConfigurationTests.java

示例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"));
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:15,代码来源:HealthMvcEndpointAutoConfigurationTests.java

示例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);
}
 
开发者ID:Contargo,项目名称:iris,代码行数:7,代码来源:ActuatorConfig.java


注:本文中的org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。