Modify jackson exception

This commit is contained in:
DOHA 2014-12-20 15:09:24 +02:00
parent 9163f109d3
commit 415e6ea607
2 changed files with 8 additions and 2 deletions

View File

@ -2,12 +2,15 @@ package org.baeldung.jackson.exception;
public class Zoo {
public Animal animal;
public Zoo() {
}
}
abstract class Animal {
public String name;
protected Animal() {
public Animal() {
}
}

View File

@ -4,13 +4,16 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
public class ZooConfigured {
public AnimalConfigured animal;
public ZooConfigured() {
}
}
@JsonDeserialize(as = CatConfigured.class)
abstract class AnimalConfigured {
public String name;
protected AnimalConfigured() {
public AnimalConfigured() {
}
}