mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-27 16:14:32 +08:00
refactor(context): 重构上下文过滤器配置
- 为 ContextWebFilter 和 ContextServletFilter 添加 ContextHolder 参数 - 优化了上下文过滤器的创建逻辑,提高灵活性和可扩展性
This commit is contained in:
parent
7a6c371aa3
commit
f6794fd14f
@ -145,7 +145,8 @@ class ForgeContextAutoConfiguration {
|
||||
fun contextWebFilter(
|
||||
chain: List<ContextProcessor>,
|
||||
reactorProcessor: ReactorProcessor,
|
||||
) = ContextWebFilter(chain, reactorProcessor)
|
||||
contextHolder: ContextHolder
|
||||
) = ContextWebFilter(chain, reactorProcessor,contextHolder)
|
||||
}
|
||||
|
||||
/* ───────────────────────────────────────────────────────────────
|
||||
@ -170,8 +171,8 @@ class ForgeContextAutoConfiguration {
|
||||
*/
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
fun contextServletFilter(chain: List<ContextProcessor>) =
|
||||
ContextServletFilter(chain)
|
||||
fun contextServletFilter(chain: List<ContextProcessor>,contextHolder: ContextHolder) =
|
||||
ContextServletFilter(chain,contextHolder)
|
||||
}
|
||||
|
||||
/* ───────────────────────────────────────────────────────────────
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user