Я нажимаю на API и получаю ответ, используя объект resttemplate.exchange, и я отображаю ответ на параметризованный объект. Все переменные внутри класса ответа отображаются на объект объекта ответа, но не на переменные класса Attribute внутрипараметризованный объект.
ResponseEntity<ArrayList<Response>> responseEntity =
restTemplate.exchange(
builder.toUriString(),
HttpMethod.GET,
new HttpEntity<>(headers),
new ParameterizedTypeReference<ArrayList<Response>>()
{});
@Getter
@Setter
public class Response {
private String number;
private String id;
private String name;
@JsonProperty("attributes")
private ArrayList<Attributes> attributes ;
}
@Getter
@Setter
@JsonIgnoreProperties(ignoreUnknown=true)
public class Attributes {
private String value;
private String name;
}