我在Spring Boot应用程序中有一个简单的@RestController设置。我有弹簧过滤器设置,可以点击此“ / desktop / sessionTimeoutCheck”以确保用户会话仍处于活动状态。它在大多数时间都有效,然后停止工作。
当我查看日志时,看到“未找到hanlder” DEBUG级别的消息,但是我知道此控制器基于我正在打印的“在桌面会话处理程序中”消息而被命中。看到此消息是正常现象,还是控制器设置有问题?
控制器
@RequestMapping(value = "/desktop/sessionTimeoutCheck", method = GET)
public ResponseEntity<RestResponse> sessionCheck() {
System.out.println("SessionController: In desktop session handler");
return new ResponseEntity<>(new RestResponse<>(null, MessageSeverity.SUCCESS, "Done"), HttpStatus.OK);
}
日志
o.s.b.w.f.OrderedRequestContextFilter : Bound request context to thread: Request(GET //localhost:8080/desktop/sessionTimeoutCheck)@6bb79ef4
o.s.b.a.e.mvc.EndpointHandlerMapping : Looking up handler method for path /desktop/sessionTimeoutCheck
o.s.b.a.e.mvc.EndpointHandlerMapping : Did not find handler method for [/desktop/sessionTimeoutCheck]
SessionController: In desktop session handler
o.s.b.w.f.OrderedRequestContextFilter : Cleared thread-bound request context: Request(GET //localhost:8080/desktop/sessionTimeoutCheck)@6bb79ef4