Request:
@Headers("userId: {userId}")
@RequestMapping(method = RequestMethod.GET, value = "/token")
String getToken(@RequestHeader(name = "userId") Long userId);
Handler:
@GetMapping("/token")
public ResponseEntity<?> getToken(@RequestHeader String userId) throws NoSuchAlgorithmException, InvalidKeySpecException {
String token = jwtAuth.generateToken(userId);
return ok(token);
}
Exception:
java.lang.AbstractMethodError: Receiver class org.springframework.cloud.openfeign.support.SpringDecoder$FeignResponseAdapter does not define or inherit an implementation of the resolved method 'abstract org.springframework.http.HttpStatusCode getStatusCode()' of interface org.springframework.http.client.ClientHttpResponse.
Not sure what I'm doing wrong here. I can post full stacktrace if needed
OpenFeign version is 3.1.5 Springboot 3