首页 > 解决方案 > 弹簧反应器异常

问题描述

我使用 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)

标签: springexceptionreactive

解决方案


您的 API 方法缺少@RequestMapping().

那应该解决它。


推荐阅读