issues
search
uniquejava
/
blog
My notes regarding the vibrating frontend :boom and the plain old java :rofl.
Creative Commons Zero v1.0 Universal
11
stars
5
forks
source link
Scope 'session' is not active for the current thread;
#277
Open
uniquejava
opened
4 years ago
uniquejava
commented
4 years ago
把bean改成Thread Scope.
https://memorynotfound.com/spring-custom-scope-creating-and-implementing-threadscope/
在Thread中不使用依赖注入
把Thread中依赖的service通过参数传给Thread:
https://stackoverflow.com/questions/7405232/why-does-autowiring-not-function-in-a-thread
参考:
https://www.kimullaa.com/entry/2016/11/01/234211
https://stackoverflow.com/questions/21286675/scope-session-is-not-active-for-the-current-thread-illegalstateexception-no
参考: