Skip to content

Commit

Permalink
Refine RequestContextFilter order
Browse files Browse the repository at this point in the history
Use an order relative to REQUEST_WRAPPER_FILTER_MAX_ORDER.

Closes spring-projectsgh-2637
  • Loading branch information
philwebb committed Oct 20, 2015
1 parent 15fbb8d commit 88cc883
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.springframework.boot.context.web;

import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.core.Ordered;
import org.springframework.web.filter.RequestContextFilter;

Expand All @@ -27,8 +28,8 @@
*/
public class OrderedRequestContextFilter extends RequestContextFilter implements Ordered {

// Order defaults to high but after Spring Session filter
private int order = Ordered.HIGHEST_PRECEDENCE + 100;
// Order defaults to after Spring Session filter
private int order = FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER + 5;

@Override
public int getOrder() {
Expand Down

0 comments on commit 88cc883

Please sign in to comment.