Java 类org.springframework.web.filter.RequestContextFilter 实例源码

项目:azeroth    文件:BaseApplicaionConfig.java   
public BaseApplicaionConfig() {
    //设置默认时区
    System.setProperty("user.timezone", "Asia/Shanghai");

    register(ValidationContextResolver.class);
    property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);
    property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);

    this.packages(packages());
    register(ObjectMapperResolver.class);
    register(JacksonFeature.class);
    register(JacksonJsonProvider.class);
    register(new BaseExceptionMapper(createExcetionWrapper()));
    register(RequestContextFilter.class);

    register(DefaultWebFilter.class);

    if (FilterConfig.apiDocEnabled()) {
        register(SwaggerSerializers.class);
    }
}
项目:jeesuite-libs    文件:BaseApplicaionConfig.java   
public BaseApplicaionConfig() {
    //设置默认时区
    System.setProperty("user.timezone","Asia/Shanghai");

    register(ValidationContextResolver.class);
    property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);
    property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);

    this.packages(packages());

    register(ObjectMapperResolver.class);
    register(JacksonFeature.class);
    register(JacksonJsonProvider.class);
    register(new BaseExceptionMapper(createExcetionWrapper()));
    register(RequestContextFilter.class);

    register(DefaultWebFilter.class);
    //
    if(FilterConfig.apiDocEnabled()){
        register(SwaggerSerializers.class);
    }
}
项目:java-platform    文件:CentralizeInitializer.java   
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
    Map<String, String> filterChainDefinitionMap = Application.getSecurityFilterChainDefinitionMap();
    filterChainDefinitionMap.put("/admin", DefaultFilter.authc.name());
    filterChainDefinitionMap.put("/admin/logout", DefaultFilter.logout.name());
    filterChainDefinitionMap.put("/admin/**", DefaultFilter.authc.name());

    List<Filter> filters = Application.getFilters();

    DelegatingFilterProxy shiroFilter = new DelegatingFilterProxy("shiroFilter");
    shiroFilter.setTargetFilterLifecycle(true);
    filters.add(shiroFilter);

    filters.add(new RequestContextFilter());
    filters.add(new CharacterEncodingFilter("UTF-8", true));
}
项目:errai-spring-boot-sample    文件:Application.java   
@Bean
public FilterRegistrationBean requestContextFilter() {
    final FilterRegistrationBean filterRegBean = new FilterRegistrationBean();
    filterRegBean.setFilter(new RequestContextFilter());
    filterRegBean.addUrlPatterns("*");
    filterRegBean.setEnabled(Boolean.TRUE);
    filterRegBean.setName("RequestContextFilter");
    return filterRegBean;
}
项目:jeesuite-demo    文件:ApplicationConfig.java   
public ApplicationConfig() {

        System.setProperty("user.timezone", "Asia/Shanghai");
        this.packages(new String[]{this.getClass().getPackage().getName()});
        this.register(ObjectMapperResolver.class);
        this.register(JacksonFeature.class);
        this.register(JacksonJsonProvider.class);
        this.register(BaseExceptionMapper.class);
        this.register(RequestContextFilter.class);
        //this.register(CorsFilter.class);
        register(FormatJsonDynamicFeature.class);

    }
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JerseyAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public FilterRegistrationBean requestContextFilter() {
    FilterRegistrationBean registration = new FilterRegistrationBean();
    registration.setFilter(new RequestContextFilter());
    registration.setOrder(this.jersey.getFilter().getOrder() - 1);
    registration.setName("requestContextFilter");
    return registration;
}
项目:nbone    文件:SpringWebApplicationInitializer.java   
/**
 * <p>默认关闭<p>
 * 加载RequestContextFilter 用于将RequestContext存储于当前线程
 * @param servletContext
 */
protected void initRequestContextFilter(ServletContext servletContext){
    String enableRequestContextFilter  = servletContext.getInitParameter("enableRequestContext");
    if(BooleanUtils.valueOf(enableRequestContextFilter)){
        //RequestContextFilter  
        RequestContextFilter requestContextFilter =  new RequestContextFilter();

        FilterRegistration filterRegistration =  servletContext.addFilter("requestContextFilter", requestContextFilter);

        filterRegistration.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/*");
    }
}
项目:spring-boot-concourse    文件:JerseyAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public FilterRegistrationBean requestContextFilter() {
    FilterRegistrationBean registration = new FilterRegistrationBean();
    registration.setFilter(new RequestContextFilter());
    registration.setOrder(this.jersey.getFilter().getOrder() - 1);
    registration.setName("requestContextFilter");
    return registration;
}
项目:contestparser    文件:JerseyAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
public FilterRegistrationBean requestContextFilter() {
    FilterRegistrationBean registration = new FilterRegistrationBean();
    registration.setFilter(new RequestContextFilter());
    registration.setOrder(this.jersey.getFilter().getOrder() - 1);
    registration.setName("requestContextFilter");
    return registration;
}
项目:cf-sample-service    文件:ApplicationWebSecurityConfigurerAdapterIT.java   
@PostConstruct
private void initialize() {
    mvc = MockMvcBuilders.webAppContextSetup(webApplicationContext)
          .addFilter(new RequestContextFilter())
          .addFilter(springSecurityFilterChain)
          .build();

    mockSession = new MockHttpSession(webApplicationContext.getServletContext(), UUID.randomUUID().toString());
}
项目:MaritimeCloudPortalTestbed    文件:JerseyConfig.java   
public JerseyConfig() {
    System.out.println("Initializing JerseyConfig");
    register(RequestContextFilter.class);

    // NOTE: scanning does not appear to work with java jar launcher (as opposed to 'mvn springboot:run' which does) !?
    //       Explicitly register all resources here instead :-(
    register(ActivityResource.class);
    register(AlmanacResource.class);
    register(AuthenticationResource.class);
    register(GenericCommandResource.class);
    register(OrganizationResource.class);
    register(UniqueIdResource.class);
    register(UserResource.class);
    register(LoggingFilter.class);
}
项目:unidle-old    文件:DispatcherServletInitializer.java   
@Override
protected Filter[] getServletFilters() {
    return new Filter[]{
            new MDCInsertingServletFilter(),
            new HiddenHttpMethodFilter(),
            new OpenEntityManagerInViewFilter(),
            new RequestContextFilter(),
            new SecurityContextPersistenceFilter()
    };
}
项目:ait-platform    文件:AitOAuth2ConfigBase.java   
@Bean
public RequestContextFilter requestContextFilter() {
    return new RequestContextFilter();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:WebMvcAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean({ RequestContextListener.class,
        RequestContextFilter.class })
public static RequestContextFilter requestContextFilter() {
    return new OrderedRequestContextFilter();
}
项目:spring-boot-concourse    文件:WebMvcAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean({ RequestContextListener.class,
        RequestContextFilter.class })
public RequestContextFilter requestContextFilter() {
    return new OrderedRequestContextFilter();
}
项目:contestparser    文件:WebMvcAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean({ RequestContextListener.class,
        RequestContextFilter.class })
public RequestContextFilter requestContextFilter() {
    return new OrderedRequestContextFilter();
}
项目:onboard    文件:RedisMessageReceiver.java   
@Bean
public RequestContextFilter registrationRequestFilter() {
    RequestContextFilter requestContextFilter = new RequestFilter();
    return requestContextFilter;
}
项目:onboard    文件:Application.java   
@Bean
public RequestContextFilter registrationRequestFilter() {

    RequestContextFilter requestContextFilter = new RequestFilter();

    return requestContextFilter;

}