我必须获取请求 Http Header 的语言并将其存储在线程上下文中RestController,服务可以通过使用SimpleThreadScope. 但是我发现,@RestController无法获取存储的对象,我将创建一个新实例。我查了一下,从@RestController到没问题@service。但是不能将对象从 Filter 传输到@RestController具有由SimpleThreadScope.
为什么 Scope 实现的 ScopeSimpleThreadScope不能从 Filter( GenericFilterBean)转移到 Controller( @RestController)。