spring - 弹簧反应器异常
问题描述
我使用 Spring React 得到以下异常。
我的方法:
public Mono<A> getA(
@PathVariable(value = "id") Long id) {
return <<some service call that returns Mono<A> >>;
}
例外:
019-03-22 17:55:59,518 priority=ERROR app_name=sync thread=reactor-http-nio-1 location=DefaultErrorWebExceptionHandler line=218 无法处理请求 [GET http://localhost:10019/ext/stubhub/event /9874282/eventSectionZone] reactor.core.Exceptions$ReactorRejectedExecutionException:调度程序在 com.tu.sync.node.stubhub.remoterepository.EventRepository.lambda$getSectionZoneData$6(EventRepository.java:111) 处的 reactor.core.Exceptions.failWithRejected(Exceptions.java:249) 不可用) 在 org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.lambda$bodyToPublisher$5( DefaultWebClient.java:440) 在 java.util.Optional.map(Optional.java:215) 在 org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.bodyToPublisher(DefaultWebClient.java:440) 在 org.springframework .web.reactive.function.client.DefaultWebClient$DefaultResponseSpec。lambda$bodyToMono$0(DefaultWebClient.java:400) 在 reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:118) 在 reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67)
解决方案
您的 API 方法缺少@RequestMapping()
.
那应该解决它。
推荐阅读
- ruby-on-rails - 如何修复 Ruby 中的“OpenSSL::SSL::SSLError”错误?
- string - 范围内的算术运算顺序问题
- python - `CommandList[Count:Count + len(Command)] == Command`中的`Count : Count`在python中做了什么?
- java - 如何在世界坐标空间中绘制文本?
- python - 如何随机获取最新浏览器版本的用户代理?
- javascript - 我设置边距的功能无法始终如一地工作
- python - 立即处理异步响应
- python - 将 Flask 与 SQLAlchemy 和 Dash 一起使用
- maven - 在远程服务器上部署之前如何更改一些 java 变量?
- java - 如何在其中一个模块中构建没有主类的多模块 Maven 项目