當前位置: 首頁>>代碼示例>>Java>>正文


Java JolokiaMvcEndpoint類代碼示例

本文整理匯總了Java中org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint的典型用法代碼示例。如果您正苦於以下問題:Java JolokiaMvcEndpoint類的具體用法?Java JolokiaMvcEndpoint怎麽用?Java JolokiaMvcEndpoint使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


JolokiaMvcEndpoint類屬於org.springframework.boot.actuate.endpoint.mvc包,在下文中一共展示了JolokiaMvcEndpoint類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: agentServletWithCustomPath

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
@Test
public void agentServletWithCustomPath() throws Exception {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context,
			"endpoints.jolokia.path=/foo/bar");
	this.context.register(EndpointsConfig.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertThat(this.context.getBeanNamesForType(JolokiaMvcEndpoint.class)).hasSize(1);
	MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(this.context).build();
	mockMvc.perform(MockMvcRequestBuilders.get("/foo/bar"))
			.andExpect(MockMvcResultMatchers.content()
					.string(Matchers.containsString("\"request\":{\"type\"")));
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:18,代碼來源:JolokiaAutoConfigurationTests.java

示例2: parameters

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的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

示例3: agentServletWithCustomPath

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
@Test
public void agentServletWithCustomPath() throws Exception {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context,
			"endpoints.jolokia.path=/foo/bar");
	this.context.register(EndpointsConfig.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertEquals(1,
			this.context.getBeanNamesForType(JolokiaMvcEndpoint.class).length);
	MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(this.context).build();
	mockMvc.perform(MockMvcRequestBuilders.get("/foo/bar"))
			.andExpect(MockMvcResultMatchers.content()
					.string(Matchers.containsString("\"request\":{\"type\"")));
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:19,代碼來源:JolokiaAutoConfigurationTests.java

示例4: jolokiaEndpoint

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
@Bean
@ConditionalOnMissingBean
public JolokiaMvcEndpoint jolokiaEndpoint() {
	JolokiaMvcEndpoint endpoint = new JolokiaMvcEndpoint();
	endpoint.setInitParameters(getInitParameters());
	return endpoint;
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:8,代碼來源:JolokiaAutoConfiguration.java

示例5: agentServletRegisteredWithAppContext

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
@Test
public void agentServletRegisteredWithAppContext() throws Exception {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context, "jolokia.config[key1]:value1",
			"jolokia.config[key2]:value2");
	this.context.register(Config.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertThat(this.context.getBeanNamesForType(JolokiaMvcEndpoint.class)).hasSize(1);
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:14,代碼來源:JolokiaAutoConfigurationTests.java

示例6: assertEndpointDisabled

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
private void assertEndpointDisabled(String... pairs) {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context, pairs);
	this.context.register(Config.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertThat(this.context.getBeanNamesForType(JolokiaMvcEndpoint.class)).isEmpty();
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:JolokiaAutoConfigurationTests.java

示例7: assertEndpointEnabled

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
private void assertEndpointEnabled(String... pairs) {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context, pairs);
	this.context.register(Config.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertThat(this.context.getBeanNamesForType(JolokiaMvcEndpoint.class)).hasSize(1);
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:JolokiaAutoConfigurationTests.java

示例8: agentServletRegisteredWithAppContext

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
@Test
public void agentServletRegisteredWithAppContext() throws Exception {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context, "jolokia.config[key1]:value1",
			"jolokia.config[key2]:value2");
	this.context.register(Config.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertEquals(1,
			this.context.getBeanNamesForType(JolokiaMvcEndpoint.class).length);
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:15,代碼來源:JolokiaAutoConfigurationTests.java

示例9: assertEndpointDisabled

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
private void assertEndpointDisabled(String... pairs) {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context, pairs);
	this.context.register(Config.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertEquals(0,
			this.context.getBeanNamesForType(JolokiaMvcEndpoint.class).length);
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:13,代碼來源:JolokiaAutoConfigurationTests.java

示例10: assertEndpointEnabled

import org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint; //導入依賴的package包/類
private void assertEndpointEnabled(String... pairs) {
	this.context = new AnnotationConfigEmbeddedWebApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context, pairs);
	this.context.register(Config.class, WebMvcAutoConfiguration.class,
			PropertyPlaceholderAutoConfiguration.class,
			ManagementServerPropertiesAutoConfiguration.class,
			HttpMessageConvertersAutoConfiguration.class,
			JolokiaAutoConfiguration.class);
	this.context.refresh();
	assertEquals(1,
			this.context.getBeanNamesForType(JolokiaMvcEndpoint.class).length);
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:13,代碼來源:JolokiaAutoConfigurationTests.java


注:本文中的org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。