I have to get Language of request Http Header and store in a thread context to RestController
and Service can get them by using SimpleThreadScope
. But I have found that, @RestController
can't get the stored object, i will create a new instance. I checked that, from @RestController
to @service
is ok. But can't transfer object from Filter to @RestController
through a bean with thread scope that installed by SimpleThreadScope
.
Why Scope implemented by SimpleThreadScope
can't transfer from Filter(GenericFilterBean
) to a Controller (@RestController
).