本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}