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


Java FilterRegistrationBean.setUrlPatterns方法代碼示例

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


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

示例1: mongoFilterBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean mongoFilterBean() {
  FilterRegistrationBean registrationBean = new FilterRegistrationBean();
  registrationBean.setFilter(mongoFilter);
  List<String> urls = new ArrayList<String>();
  
  urls.add("/");
  urls.add("/user");
  urls.add("/login");
  urls.add("/history/*");
  urls.add("/features/*");
  urls.add("/admin/*");
  urls.add("/pipelines/*");
  urls.add("/api/output/*");
  
  registrationBean.setUrlPatterns(urls);
  return registrationBean;
}
 
開發者ID:Apereo-Learning-Analytics-Initiative,項目名稱:LearningAnalyticsProcessor,代碼行數:19,代碼來源:MongoMultiTenantConfiguration.java

示例2: corsFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean corsFilter()
{
	FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
	filterRegistrationBean.setFilter(new CORSFilter());
	filterRegistrationBean.setDispatcherTypes(DispatcherType.REQUEST);
	filterRegistrationBean.setUrlPatterns(Arrays.asList("/*"));
	filterRegistrationBean.setOrder(Integer.MIN_VALUE + 1000);
	return filterRegistrationBean;
}
 
開發者ID:tmply,項目名稱:tmply,代碼行數:11,代碼來源:WebMvcConfig.java

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

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

示例5: userAgentMetricFilterRegistrationBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@ConditionalOnProperty("user-agent-metric.url-patterns")
@Bean
public FilterRegistrationBean userAgentMetricFilterRegistrationBean(final UserAgentMetricFilter filter,
                                                                    UserAgentMetricFilterConfiguration configuration) {
    final FilterRegistrationBean bean = new FilterRegistrationBean();
    bean.setFilter(filter);
    bean.setUrlPatterns(configuration.getUrlPatterns());
    return bean;
}
 
開發者ID:lukashinsch,項目名稱:spring-boot-actuator-user-agent-metrics,代碼行數:10,代碼來源:UserAgentMetricFilterAutoConfiguration.java

示例6: originFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean originFilter() {
	FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
	filterRegistrationBean.setFilter(new ApiOriginFilter());
	filterRegistrationBean.setUrlPatterns(Arrays.asList(Apis.PREFIX + "/*"));
	return filterRegistrationBean;
}
 
開發者ID:Treydone,項目名稱:mandrel,代碼行數:8,代碼來源:Coordinator.java

示例7: originFilter

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean originFilter() {
	FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
	filterRegistrationBean.setFilter(new ApiOriginFilter());
	filterRegistrationBean.setUrlPatterns(Arrays.asList("/*"));
	return filterRegistrationBean;
}
 
開發者ID:Treydone,項目名稱:mandrel,代碼行數:8,代碼來源:Standalone.java

示例8: sessionRepositoryFilterRegistration

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
@Order(value = 0)
public FilterRegistrationBean sessionRepositoryFilterRegistration(SessionRepositoryFilter springSessionRepositoryFilter)
{
    FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
    filterRegistrationBean.setFilter(new DelegatingFilterProxy(springSessionRepositoryFilter));
    filterRegistrationBean.setUrlPatterns(Arrays.asList("/*"));
    return filterRegistrationBean;
}
 
開發者ID:osmmosques,項目名稱:osm-mosques,代碼行數:10,代碼來源:SecurityConfiguration.java

示例9: corsFilterBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean corsFilterBean() {
	FilterRegistrationBean registrationBean = new FilterRegistrationBean();
	registrationBean.setFilter(corsFilter);
	List<String> urls = new ArrayList<String>(1);
   urls.add("/v1/*");
	registrationBean.setUrlPatterns(urls);
	registrationBean.setOrder(1);
	return registrationBean;
}
 
開發者ID:Apereo-Learning-Analytics-Initiative,項目名稱:OpenLRS,代碼行數:11,代碼來源:Application.java

示例10: securityFilterBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean securityFilterBean() {
	FilterRegistrationBean registrationBean = new FilterRegistrationBean();
	registrationBean.setFilter(openLRSAuthenticationFilter);
	List<String> urls = new ArrayList<String>(2);
	urls.add("/v1/*");
	registrationBean.setUrlPatterns(urls);
	registrationBean.setOrder(2);
	return registrationBean;
}
 
開發者ID:Apereo-Learning-Analytics-Initiative,項目名稱:OpenLRS,代碼行數:11,代碼來源:Application.java

示例11: validationFilterBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean validationFilterBean() {
	FilterRegistrationBean registrationBean = new FilterRegistrationBean();
	registrationBean.setFilter(xapiRequestValidationFilter);
	List<String> urls = new ArrayList<String>(1);
	urls.add("/v1/xAPI/*");
	registrationBean.setUrlPatterns(urls);
	registrationBean.setOrder(3);
	return registrationBean;
}
 
開發者ID:Apereo-Learning-Analytics-Initiative,項目名稱:OpenLRS,代碼行數:11,代碼來源:Application.java

示例12: oAuthFilterBean

import org.springframework.boot.context.embedded.FilterRegistrationBean; //導入方法依賴的package包/類
@Bean
public FilterRegistrationBean oAuthFilterBean() {
	FilterRegistrationBean registrationBean = new FilterRegistrationBean();
	registrationBean.setFilter(oAuthFilter);
	List<String> urls = new ArrayList<String>(1);
	urls.add("/lti");
	registrationBean.setUrlPatterns(urls);
	registrationBean.setOrder(4);
	return registrationBean;
}
 
開發者ID:Apereo-Learning-Analytics-Initiative,項目名稱:OpenLRS,代碼行數:11,代碼來源:Application.java


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