[오류] Scope 'request' is not active for the current thread


[오류] Scope 'request' is not active for the current thread

scope request 활성화 오류 request scope를 HTTP 요청에 따라 로그를 찍는 MyLogger 클래스를 만들어 테스트 해보고 있었는데 No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request. Scope 'request' is not active for the current thread; consi..........



원문링크 : [오류] Scope 'request' is not active for the current thread