Jackson JSON deserialization with multiple parameters constructor
You need to add the annotation @JsonProperty specifying the name of the json property that needs to be passed to the constructor when creating the object. public class Cruise extends WaterVehicle { private Integer maxSpeed; @JsonCreator public Cruise(@JsonProperty(“name”) String name, @JsonProperty(“maxSpeed”)Integer maxSpeed) { super(name); System.out.println(“Cruise.Cruise”); this.maxSpeed = maxSpeed; } public Integer getMaxSpeed() { return maxSpeed; … Read more