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