Commit a86151e2f3fe1c1a9b433b3d04e37c92ef2ce74a
1 parent
91b935c9
因为嘉定的车辆表加了许多新的字段,但是实体类里没有定义,导致jackson反序列化的时候出问题,空指针,现在修改cars的@JsonIgnoreProperti…
…es里的ignoreUnknown=true,忽略不存在的字段
Showing
1 changed file
with
1 additions
and
1 deletions
src/main/java/com/bsth/entity/Cars.java
| ... | ... | @@ -24,7 +24,7 @@ import java.util.Date; |
| 24 | 24 | |
| 25 | 25 | @Entity |
| 26 | 26 | @Table(name = "bsth_c_cars") |
| 27 | -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | |
| 27 | +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}, ignoreUnknown = true) | |
| 28 | 28 | public class Cars extends BEntity implements Serializable { |
| 29 | 29 | |
| 30 | 30 | /** 主键Id */ | ... | ... |