Когда я вызываю api microservice rest, как это:
Response<List<RoomPlay>> response = reportRoomHappyBombDetailController.happybombRoomDetailAnalysis(BizAnalysisConstant.DEFAULT_ANALYSIS_PREV_DAY, roomPlay.getId());
выдает эту ошибку:
2020-04-01 23:46:00.954 ERROR 1 --- [cTaskExecutor-1] c.s.s.r.c.room.RoomCreateMessageHandler : 统计执行遇到问题
feign.FeignException: status 404 reading IReportRoomHappyBombDetailController#happybombRoomDetailAnalysis(Integer,Long)
at feign.FeignException.errorStatus(FeignException.java:78) ~[feign-core-10.1.0.jar!/:na]
at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:93) ~[feign-core-10.1.0.jar!/:na]
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:149) ~[feign-core-10.1.0.jar!/:na]
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:78) ~[feign-core-10.1.0.jar!/:na]
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103) ~[feign-core-10.1.0.jar!/:na]
at com.sun.proxy.$Proxy178.happybombRoomDetailAnalysis(Unknown Source) ~[na:na]
at com.sportswin.soa.report.consume.room.RoomCreateMessageHandler.roomDetailStatistic(RoomCreateMessageHandler.java:161) [classes!/:na]
at com.sportswin.soa.report.consume.room.RoomCreateMessageHandler.staticPlayRoom(RoomCreateMessageHandler.java:148) [classes!/:na]
at com.sportswin.soa.report.consume.room.RoomCreateMessageHandler.handle(RoomCreateMessageHandler.java:105) [classes!/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:170) [spring-messaging-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:120) [spring-messaging-5.1.5.RELEASE.jar!/:5.1.5.RELEASE]
at org.springframework.amqp.rabbit.listener.adapter.DelegatingInvocableHandler.invoke(DelegatingInvocableHandler.java:130) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:60) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:190) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:127) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1547) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1473) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1461) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:1456) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1405) [spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:870) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:854) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1600(SimpleMessageListenerContainer.java:78) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.mainLoop(SimpleMessageListenerContainer.java:1137) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1043) ~[spring-rabbit-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_212]
это мой код на стороне сервера:
@RequestMapping(value = "/analysis/app/happybomb/room")
@FeignClient(name = "soa-report-analysis-service")
public interface IReportRoomHappyBombDetailController {
@GetMapping("/overview")
Response<List<RoomPlay>> happybombRoomDetailAnalysis(@RequestParam(required = false, defaultValue = "2", value = "lastDay") Integer lastDay,
@RequestParam(required = false, value = "roomPlayId") Long roomPlayId);
}
служба может успешно получить запрос и ответ, но клиентская сторона всегда выдает сообщение об ошибке. Я очень сбиваю с толку, если что-то идет не так? Spring Boot version 2.1.3, Spring Cloud Version: Greenwich.SR1.