當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。