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


Java FilterRegistrationBean.setName方法代码示例

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


在下文中一共展示了FilterRegistrationBean.setName方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: threadLocalFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean threadLocalFilter() {
    Filter filter = new MDCServletFilter();
    FilterRegistrationBean registration = new FilterRegistrationBean(filter);
    registration.setOrder(Ordered.HIGHEST_PRECEDENCE);
    registration.setName(MDCServletFilter.class.getSimpleName());
    return registration;
}
 
开发者ID:zouzhirong,项目名称:configx,代码行数:9,代码来源:WebAutoConfiguration.java

示例4: httpMethodFilterRegistration

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean httpMethodFilterRegistration() {
    FilterRegistrationBean registration = new FilterRegistrationBean();
    registration.setFilter(httpMethodFilter());
    registration.addUrlPatterns("/*");
    registration.setName("httpMethodFilter");
    registration.setOrder(Ordered.HIGHEST_PRECEDENCE + 1);
    return registration;
}
 
开发者ID:melthaw,项目名称:spring-backend-boilerplate,代码行数:10,代码来源:OpenApiWebMvcConfigurer.java

示例5: 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

示例6: FilterRegistrationBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean()
FilterRegistrationBean FilterRegistrationBean() {
    final FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
    filterRegistrationBean.setFilter(new DelegatingFilterProxy("springSecurityFilterChain"));
    filterRegistrationBean.setName("springSecurityFilterChain");
    filterRegistrationBean.addUrlPatterns("/api/*");
    return filterRegistrationBean;
}
 
开发者ID:tvajjala,项目名称:interview-preparation,代码行数:9,代码来源:WebSecurityConfig.java

示例7: catFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean catFilter() {
	
	FilterRegistrationBean bean = new FilterRegistrationBean();
	bean.setFilter(new CatFilter());
	bean.setName("cat-filter");
	bean.addUrlPatterns("/*");
	bean.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.FORWARD);
	return bean;
}
 
开发者ID:ctripcorp,项目名称:x-pipe,代码行数:11,代码来源:CatConfig.java

示例8: loggingFilterRegistration

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean loggingFilterRegistration() {
    FilterRegistrationBean registrationBean = new FilterRegistrationBean();
    registrationBean.setFilter(loggingFilter());
    registrationBean.setUrlPatterns(Collections.singletonList("/*"));
    registrationBean.setName("LoggingFilter");
    return registrationBean;
}
 
开发者ID:thomasletsch,项目名称:moserp,代码行数:9,代码来源:RestConfiguration.java

示例9: requestContextFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
@ConditionalOnMissingBean
public FilterRegistrationBean requestContextFilter() {
	FilterRegistrationBean registration = new FilterRegistrationBean();
	registration.setFilter(new RequestContextFilter());
	registration.setOrder(this.jersey.getFilter().getOrder() - 1);
	registration.setName("requestContextFilter");
	return registration;
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:10,代码来源:JerseyAutoConfiguration.java

示例10: 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

示例11: openEntityManagerInViewFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean openEntityManagerInViewFilter() {
    FilterRegistrationBean reg = new FilterRegistrationBean();
    reg.setName("OpenEntityManagerInViewFilter");
    reg.setFilter(new OpenEntityManagerInViewFilter());
    return reg;
}
 
开发者ID:lumenrobot,项目名称:lumen,代码行数:8,代码来源:WicketConfig.java

示例12: securityFilterChain

import org.springframework.boot.context.embedded.FilterRegistrationBean; //导入方法依赖的package包/类
@Bean
public FilterRegistrationBean securityFilterChain(@Qualifier(AbstractSecurityWebApplicationInitializer.DEFAULT_FILTER_NAME) Filter securityFilter) {
    FilterRegistrationBean registration = new FilterRegistrationBean(securityFilter);
    registration.setOrder(Integer.MAX_VALUE - 1);
    registration.setName(AbstractSecurityWebApplicationInitializer.DEFAULT_FILTER_NAME);
    return registration;
}
 
开发者ID:sivaprasadreddy,项目名称:jcart,代码行数:8,代码来源:WebConfig.java


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