Я пытаюсь заставить Джексона десериализовать
{
"test": 2018
}
до
SomeJavaClass:
private final Test test
Но я хочу сделать свой тестовый класс с использованием Project Lombok.Однако Lombok аннотирует класс с помощью ConstructorProperties, и по какой-то причине это делает Джексона неудачным.
Мои классы выглядят так:
@Value
public class SomeJavaClass {
Test test;
}
@Value
public class Test{
String value;
}
Тест деломбоксируется как:
public class Test {
int value;
@java.beans.ConstructorProperties({"value"})
public Test(final int value) {
this.value = value;
}
public int getValue() {
return this.value;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof Test)) {
return false;
}
final Test other = (Test) o;
if (this.getValue() != other.getValue()) {
return false;
}
return true;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = result * PRIME + this.getValue();
return result;
}
public String toString() {
return "Test(value=" + this.getValue() + ")";
}
}
Можно ли заставить Джексона как-то игнорировать свойства конструктора?