当前位置: 首页>>代码示例>>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;未经允许,请勿转载。