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


Java FilterRegistrationBean.addInitParameter方法代码示例

本文整理汇总了Java中org.springframework.boot.context.embedded.FilterRegistrationBean.addInitParameter方法的典型用法代码示例。如果您正苦于以下问题:Java FilterRegistrationBean.addInitParameter方法的具体用法?Java FilterRegistrationBean.addInitParameter怎么用?Java FilterRegistrationBean.addInitParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.boot.context.embedded.FilterRegistrationBean的用法示例。


在下文中一共展示了FilterRegistrationBean.addInitParameter方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: wicketFilterRegistration

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean wicketFilterRegistration() {

	FilterRegistrationBean registration = new FilterRegistrationBean();
	WicketFilter wicketFilter = new WicketFilter();
	registration.setFilter(wicketFilter);
	registration.setName("wicketFilter");
	registration.addInitParameter(WicketFilter.APP_FACT_PARAM,
			SpringWebApplicationFactory.class.getName());
	registration.addInitParameter("configuration", configuration);
	registration.addInitParameter("testsMode", String.valueOf(testMode));
	registration.addInitParameter("mockMode",String.valueOf(mockMode));
	registration.addInitParameter(WicketFilter.FILTER_MAPPING_PARAM, "/portal/*");
	registration.addInitParameter(WicketFilter.IGNORE_PATHS_PARAM,"/favicon.ico");
	registration.addUrlPatterns("/portal/*");
	registration.setDispatcherTypes(DispatcherType.REQUEST,DispatcherType.FORWARD);
	registration.setMatchAfter(true);


	return registration;
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:22,代码来源:WicketWebInitializer.java

示例2: rewriteFilterConfig

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean rewriteFilterConfig() {
    FilterRegistrationBean reg = new FilterRegistrationBean();
    reg.setName(REWRITE_FILTER_NAME);
    reg.setFilter(new UrlRewriteFilter());
    reg.addInitParameter("confPath", REWRITE_FILTER_CONF_PATH);
    reg.addInitParameter("confReloadCheckInterval", "-1");
    reg.addInitParameter("statusPath", "/redirect");
    reg.addInitParameter("statusEnabledOnHosts", "*");
    reg.addInitParameter("logLevel", "WARN");
    return reg;
}
 
开发者ID:hosken5,项目名称:spring-boot-freemarker-showcase,代码行数:13,代码来源:SiteConfig.java

示例3: webStatFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
/**
 * druid的url监控
 * @return
 */
@Bean
public FilterRegistrationBean webStatFilter(){
	WebStatFilter filter = new WebStatFilter();
	FilterRegistrationBean bean = new FilterRegistrationBean(filter);
	bean.addUrlPatterns("/*");
	bean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,*.font,/druid/*");
	return bean;
}
 
开发者ID:mazhaoyong,项目名称:api-server-seed,代码行数:13,代码来源:WebConfig.java

示例4: encodingFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
  public FilterRegistrationBean encodingFilter() {
    FilterRegistrationBean bean = new FilterRegistrationBean();
    bean.setFilter(new CharacterEncodingFilter());
    bean.addInitParameter("encoding", "UTF-8");
    //FIXME: https://github.com/Netflix/eureka/issues/702
//    bean.addInitParameter("forceEncoding", "true");
    bean.setName("encodingFilter");
    bean.addUrlPatterns("/*");
    bean.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.FORWARD);
    return bean;
  }
 
开发者ID:dewey-its,项目名称:apollo-custom,代码行数:13,代码来源:CharacterEncodingFilterConfiguration.java

示例5: filterRegistrationBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean(name = "shiroFilter")
@DependsOn("securityManager")
@ConditionalOnMissingBean
public FilterRegistrationBean filterRegistrationBean(SecurityManager securityManager) throws Exception {
    FilterRegistrationBean filterRegistration = new FilterRegistrationBean();
    //该值缺省为false,表示生命周期由SpringApplicationContext管理,设置为true则表示由ServletContainer管理
    filterRegistration.addInitParameter("targetFilterLifecycle", "true");
    filterRegistration.setFilter((Filter) getShiroFilterFactoryBean(securityManager).getObject());
    filterRegistration.setEnabled(true);
    filterRegistration.addUrlPatterns("/*");
    return filterRegistration;
}
 
开发者ID:johntostring,项目名称:spring-boot-shiro,代码行数:13,代码来源:ShiroAutoConfiguration.java

示例6: filterRegistrationBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
/**
 * 注册DelegatingFilterProxy(Shiro)
 *
 * @param dispatcherServlet
 * @return
 * @author SHANHY
 * @create  2016年1月13日
 */
@Bean
public FilterRegistrationBean filterRegistrationBean() {
    FilterRegistrationBean filterRegistration = new FilterRegistrationBean();
    filterRegistration.setFilter(new DelegatingFilterProxy("shiroFilter"));
    //  该值缺省为false,表示生命周期由SpringApplicationContext管理,设置为true则表示由ServletContainer管理  
    filterRegistration.addInitParameter("targetFilterLifecycle", "true");
    filterRegistration.setEnabled(true);
    filterRegistration.addUrlPatterns("/*");
    return filterRegistration;
}
 
开发者ID:seagrape,项目名称:kekoa,代码行数:19,代码来源:ShiroConfiguration.java

示例7: filterRegistrationBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
/**
 * 注册DelegatingFilterProxy(Shiro)
 *
 * @param dispatcherServlet
 * @return
 * @author SHANHY
 * @create 2016年1月13日
 */
@Bean
public FilterRegistrationBean filterRegistrationBean() {
	FilterRegistrationBean filterRegistration = new FilterRegistrationBean();
	filterRegistration.setFilter(new DelegatingFilterProxy("shiroFilter"));
	// 该值缺省为false,表示生命周期由SpringApplicationContext管理,设置为true则表示由ServletContainer管理
	filterRegistration.addInitParameter("targetFilterLifecycle", "true");
	// filterRegistration.setEnabled(true);
	filterRegistration.addUrlPatterns("/*");
	return filterRegistration;
}
 
开发者ID:seagrape,项目名称:kekoa,代码行数:19,代码来源:KekoaShiroConfiguration.java

示例8: jerseyFilterRegistration

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
@ConditionalOnMissingBean(name = "jerseyFilterRegistration")
@ConditionalOnProperty(prefix = "spring.jersey", name = "type", havingValue = "filter")
public FilterRegistrationBean jerseyFilterRegistration() {
	FilterRegistrationBean registration = new FilterRegistrationBean();
	registration.setFilter(new ServletContainer(this.config));
	registration.setUrlPatterns(Arrays.asList(this.path));
	registration.setOrder(this.jersey.getFilter().getOrder());
	registration.addInitParameter(ServletProperties.FILTER_CONTEXT_PATH,
			stripPattern(this.path));
	addInitParameters(registration);
	registration.setName("jerseyFilter");
	registration.setDispatcherTypes(EnumSet.allOf(DispatcherType.class));
	return registration;
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:16,代码来源:JerseyAutoConfiguration.java

示例9: jersey

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean jersey() {
	FilterRegistrationBean bean = new FilterRegistrationBean();
	bean.setFilter(new ServletContainer());
	bean.addInitParameter("com.sun.jersey.config.property.packages",
			"com.sun.jersey;sample.jersey1");
	return bean;
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:9,代码来源:SampleJersey1Application.java

示例10: wicketFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean @DependsOn("openEntityManagerInViewFilter")
public FilterRegistrationBean wicketFilter() {
    final FilterRegistrationBean reg = new FilterRegistrationBean(new WicketFilter());
    reg.addInitParameter(WicketFilter.FILTER_MAPPING_PARAM, "/*");
    reg.addInitParameter(WicketFilter.APP_FACT_PARAM, SpringWebApplicationFactory.class.getName());
    reg.addInitParameter("applicationBean", "webApp");
    final RuntimeConfigurationType wicketConfiguration =
            env.getRequiredProperty("wicket.configuration", RuntimeConfigurationType.class);
    reg.addInitParameter("configuration", wicketConfiguration.name());
    return reg;
}
 
开发者ID:lumenrobot,项目名称:lumen,代码行数:12,代码来源:WicketConfig.java

示例11: wicketFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean wicketFilter() {
    final FilterRegistrationBean reg = new FilterRegistrationBean(new WicketFilter());
    reg.addInitParameter(WicketFilter.FILTER_MAPPING_PARAM, "/*");
    reg.addInitParameter(WicketFilter.APP_FACT_PARAM, SpringWebApplicationFactory.class.getName());
    reg.addInitParameter("applicationBean", "webApp");
    reg.addInitParameter("configuration", env.getRequiredProperty("wicket.configuration"));
    //        reg.addInitParameter("applicationClassName", MyWebApplication.class.name);
    return reg;
}
 
开发者ID:lumenrobot,项目名称:lumen,代码行数:11,代码来源:WicketConfig.java

示例12: multipartFilterRegistrationBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean multipartFilterRegistrationBean() {
    log.debug("New instance of " + FilterRegistrationBean.class);
    final MultipartFilter multipartFilter = new MultipartFilter();
    final FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(multipartFilter);
    filterRegistrationBean.addInitParameter("multipartResolverBeanName", "multipartResolver");
    return filterRegistrationBean;
}
 
开发者ID:esutoniagodesu,项目名称:egd-web,代码行数:9,代码来源:MultipartConfigurer.java

示例13: druidStatFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
/**
 * 
 * 注册一个:filterRegistrationBean
 * 
 * @return
 * 
 */

@Bean

public FilterRegistrationBean druidStatFilter() {

	FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter());

	// 添加过滤规则.

	filterRegistrationBean.addUrlPatterns("/*");

	// 添加忽略的格式信息.

	filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");

	return filterRegistrationBean;

}
 
开发者ID:shinyjunjun,项目名称:myblog,代码行数:26,代码来源:DruidConfiguration.java


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