提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.framework.common.enums; |
H |
2 |
|
|
3 |
/** |
|
4 |
* Web 过滤器顺序的枚举类,保证过滤器按照符合我们的预期 |
|
5 |
* |
|
6 |
* 考虑到每个 starter 都需要用到该工具类,所以放到 common 模块下的 enum 包下 |
|
7 |
* |
|
8 |
* @author iailab |
|
9 |
*/ |
|
10 |
public interface WebFilterOrderEnum { |
|
11 |
|
|
12 |
int CORS_FILTER = Integer.MIN_VALUE; |
|
13 |
|
|
14 |
int TRACE_FILTER = CORS_FILTER + 1; |
|
15 |
|
|
16 |
int ENV_TAG_FILTER = TRACE_FILTER + 1; |
|
17 |
|
|
18 |
int REQUEST_BODY_CACHE_FILTER = Integer.MIN_VALUE + 500; |
|
19 |
|
|
20 |
// OrderedRequestContextFilter 默认为 -105,用于国际化上下文等等 |
|
21 |
|
|
22 |
int TENANT_CONTEXT_FILTER = - 104; // 需要保证在 ApiAccessLogFilter 前面 |
|
23 |
|
|
24 |
int API_ACCESS_LOG_FILTER = -103; // 需要保证在 RequestBodyCacheFilter 后面 |
|
25 |
|
|
26 |
int XSS_FILTER = -102; // 需要保证在 RequestBodyCacheFilter 后面 |
|
27 |
|
|
28 |
// Spring Security Filter 默认为 -100,可见 org.springframework.boot.autoconfigure.security.SecurityProperties 配置属性类 |
|
29 |
|
|
30 |
int TENANT_SECURITY_FILTER = -99; // 需要保证在 Spring Security 过滤器后面 |
|
31 |
|
|
32 |
int FLOWABLE_FILTER = -98; // 需要保证在 Spring Security 过滤后面 |
|
33 |
|
|
34 |
int DEMO_FILTER = Integer.MAX_VALUE; |
|
35 |
|
|
36 |
} |