org.springframework.web.client.UnknownContentTypeException:无法提取响应:没有为响应类型 [class net.minidev.json.JSONObject] 和内容类型 [application/json] 找到合适的 HttpMessageConverter
public String handleRequest(ScheduledEvent event, Context context) {
LambdaLogger logger = context.getLogger();
String requestBody = System.getenv().get("REQUEST_BODY");
String endpointUrl = System.getenv().get("ENDPOINT_URL");
String authorizationHeader = System.getenv().get("AUTHORIZATION_HEADER");
ResponseEntity<JSONObject> response = restTemplate.getForEntity(endpointUrl, JSONObject.class);
logger.log(response.getBody().getAsString("Total document signed"));
String lambdaResponse = new String("200 OK");
return lambdaResponse;
}
endpointUrl 也返回 JSONObject 所以不明白为什么不匹配