Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.springframework.boot.web.reactive.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.core.Ordered;
import org.springframework.web.filter.reactive.HiddenHttpMethodFilter;

Expand All @@ -32,8 +31,7 @@ public class OrderedHiddenHttpMethodFilter extends HiddenHttpMethodFilter
/**
* The default order is high to ensure the filter is applied before Spring Security.
*/
public static final int DEFAULT_ORDER = FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER
- 10000;
public static final int DEFAULT_ORDER = -10000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can understand why you'd want to drop a reference to this class but I am not sure copy/pasting the default (I mean 0) is something we want to do. Perhaps we need a shared context for this?

WDYT?

Copy link
Contributor Author

@izeye izeye Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snicoll Thanks for the quick feedback! I thought the same thing but couldn't find a good place to move them. So I considered adding a constant container class like FilterOrders but with only one member, I wasn't sure it's okay. Any suggestion?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bclozel that was added as part of #14008 - Does the constant has to be the same for reactive? If it's the same then we should probably need some concept that gathers them. What do you think?


private int order = DEFAULT_ORDER;

Expand Down