SPRING - 发送格式正确时无法使用 Feign 检索 ResponseEntity

SPRING - Can't retrieve a ResponseEntity with Feign while sent correctly formated

我正在尝试在 Spring 中的两个微服务之间传递信息。一种是发送主体中带有对象的 ResponseEntity,但另一方面我似乎无法获得正确的响应。所有字段均为空。

this is the controller of my first microservice

this is what is returned when called directly

this is the code inspection of the response before it's sent

然后我尝试在另一个微服务中恢复这个响应。

This is the client

This is the call to the first API

This is the response I get

所以我被困在那里,不明白为什么我的客户无法访问数据。我在两个应用程序中都设置了断点,第一个被正确调用。

你可以在那里找到我的代码:https://github.com/Shikatamo/B3Examples

我已经试了3-4小时了,我真的卡在那里了。从我的角度来看,这看起来真的很愚蠢,但我似乎无法理解它。此时非常感谢所有帮助。

尝试摆脱客户端中的 ResponseEntity:

@Component
@FeignClient("CourseStudent")
public interface ICourseStudentClient {

    @RequestLine("GET /{id}")
    CourseStudents getOneById(@Param("id") Long id);
}