本文整理匯總了Java中org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint類的典型用法代碼示例。如果您正苦於以下問題:Java ShutdownMvcEndpoint類的具體用法?Java ShutdownMvcEndpoint怎麽用?Java ShutdownMvcEndpoint使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ShutdownMvcEndpoint類屬於org.springframework.boot.actuate.endpoint.mvc包,在下文中一共展示了ShutdownMvcEndpoint類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: shutdownEndpointEnabled
import org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint; //導入依賴的package包/類
@Test
public void shutdownEndpointEnabled() {
this.applicationContext.register(RootConfig.class, BaseConfiguration.class,
ServerPortConfig.class, EndpointWebMvcAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.applicationContext,
"endpoints.shutdown.enabled:true");
this.applicationContext.refresh();
assertThat(this.applicationContext.getBeansOfType(ShutdownMvcEndpoint.class))
.hasSize(1);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:11,代碼來源:EndpointWebMvcAutoConfigurationTests.java
示例2: shutdownEndpointEnabled
import org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint; //導入依賴的package包/類
@Test
public void shutdownEndpointEnabled() {
this.applicationContext.register(RootConfig.class, BaseConfiguration.class,
ServerPortConfig.class, EndpointWebMvcAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.applicationContext,
"endpoints.shutdown.enabled:true");
this.applicationContext.refresh();
assertThat(
this.applicationContext.getBeansOfType(ShutdownMvcEndpoint.class).size(),
is(equalTo(1)));
}
示例3: shutdownMvcEndpoint
import org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint; //導入依賴的package包/類
@Bean
@ConditionalOnBean(ShutdownEndpoint.class)
@ConditionalOnEnabledEndpoint(value = "shutdown", enabledByDefault = false)
public ShutdownMvcEndpoint shutdownMvcEndpoint(ShutdownEndpoint delegate) {
return new ShutdownMvcEndpoint(delegate);
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:7,代碼來源:EndpointWebMvcManagementContextConfiguration.java