JSON 속성을 오버라이드하여 긴 날짜 형식으로 날짜를 반환하려고합니다. 그러나 그것은 효과가없는 것처럼 보입니다. 나는 @JsonIgnore
주석을 제거하면Jackson : JSON 속성 오버라이드
@JsonIgnore
@JsonProperty("dateTime")
public long getDateTimeInLong() {
return getDateTime().getTime(); //belongs to super class. It is an AspectJ implementation.
}
나는 Conflicting getter definitions for property "dateTime":
예외를 얻을.
getDateTime() 메서드에 JsonProperty 주석이 있습니까? –
@AlexeyGavrilov 나는 일찍 잘못했다. 그냥 슈퍼 클래스를 확인했습니다. 아니,'@ JsonProperty' 주석이 없습니다. –