Search in sources :

Example 1 with RequestContextFilter

use of org.springframework.web.filter.RequestContextFilter in project spring-boot by spring-projects.

the class JerseyAutoConfiguration method requestContextFilter.

@Bean
@ConditionalOnMissingBean
public FilterRegistrationBean<RequestContextFilter> requestContextFilter() {
    FilterRegistrationBean<RequestContextFilter> registration = new FilterRegistrationBean<>();
    registration.setFilter(new RequestContextFilter());
    registration.setOrder(this.jersey.getFilter().getOrder() - 1);
    registration.setName("requestContextFilter");
    return registration;
}
Also used : RequestContextFilter(org.springframework.web.filter.RequestContextFilter) FilterRegistrationBean(org.springframework.boot.web.servlet.FilterRegistrationBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) FilterRegistrationBean(org.springframework.boot.web.servlet.FilterRegistrationBean) RegistrationBean(org.springframework.boot.web.servlet.RegistrationBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 FilterRegistrationBean (org.springframework.boot.web.servlet.FilterRegistrationBean)1 RegistrationBean (org.springframework.boot.web.servlet.RegistrationBean)1 ServletRegistrationBean (org.springframework.boot.web.servlet.ServletRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1 RequestContextFilter (org.springframework.web.filter.RequestContextFilter)1