我在 spring Async 方法中调用 ControllerLinkBuilder.linkTo 方法,但它找不到当前请求。
service.setUrl(linkTo(Controller.class, Controller.METHOD_GET,
headers.getFirst(HEADER_SOURCE), id).toString());
例外:
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Could not find current request via RequestContextHolder
Caused by: java.lang.IllegalStateException: Could not find current request via RequestContextHolder