本文整理匯總了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;
}