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


Java ServletRegistrationBean.setEnabled方法代碼示例

本文整理匯總了Java中org.springframework.boot.web.servlet.ServletRegistrationBean.setEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java ServletRegistrationBean.setEnabled方法的具體用法?Java ServletRegistrationBean.setEnabled怎麽用?Java ServletRegistrationBean.setEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.boot.web.servlet.ServletRegistrationBean的用法示例。


在下文中一共展示了ServletRegistrationBean.setEnabled方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: cxfServlet

import org.springframework.boot.web.servlet.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean cxfServlet() {
    final ServletRegistrationBean bean = new ServletRegistrationBean();
    bean.setEnabled(true);
    bean.setName("cxfServletSecurityTokenService");
    bean.setServlet(new CXFServlet());
    bean.setUrlMappings(Collections.singleton(WSFederationConstants.ENDPOINT_STS.concat("*")));
    bean.setAsyncSupported(true);
    return bean;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:11,代碼來源:CoreWsSecuritySecurityTokenServiceConfiguration.java

示例2: registration

import org.springframework.boot.web.servlet.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
public ServletRegistrationBean registration(HystrixMetricsStreamServlet servlet) {
    ServletRegistrationBean registrationBean = new ServletRegistrationBean();
    registrationBean.setServlet(servlet);
    registrationBean.setEnabled(true);
    registrationBean.addUrlMappings("/hystrix.stream");
    return registrationBean;
}
 
開發者ID:venus-boot,項目名稱:saluki,代碼行數:9,代碼來源:MonitorAutoconfiguration.java

示例3: servletRegistration

import org.springframework.boot.web.servlet.ServletRegistrationBean; //導入方法依賴的package包/類
@Bean
ServletRegistrationBean servletRegistration(DruidStatProperties druidStatConfig) {
	ServletRegistrationBean filterRegistration = new ServletRegistrationBean(new StatViewServlet());
	filterRegistration.setAsyncSupported(true);
	filterRegistration.setEnabled(true);
	filterRegistration.addUrlMappings("/druid/*");
	filterRegistration.setInitParameters(druidStatParameters(druidStatConfig));
	return filterRegistration;
}
 
開發者ID:halober,項目名稱:spring-boot-starter-dao,代碼行數:10,代碼來源:DruidWebStatAutoConfiguration.java

示例4: dispatcherServletRegistration

import org.springframework.boot.web.servlet.ServletRegistrationBean; //導入方法依賴的package包/類
/**
 * Register dispatcherServlet programmatically
 *
 * @return ServletRegistrationBean
 */
@Bean
public ServletRegistrationBean dispatcherServletRegistration() {

	ServletRegistrationBean registration = new ServletRegistrationBean(
		dispatcherServlet(), "/");

	registration
		.setName(DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME);
	registration.setAsyncSupported(true);
	registration.setEnabled(true);
	registration.setLoadOnStartup(1);

	return registration;
}
 
開發者ID:AppDirect,項目名稱:service-integration-sdk,代碼行數:20,代碼來源:AsyncServletConfiguration.java


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