有一个注册了RestResource(Spring 3.1,Jackson 2.3)的类。 当我们试图保存对象的那样使用Spring Rest Resource更新空值更多信息
A: {"prop1":1, "prop2":2}
它成功保存。
我们有以下代码:
A.setProp2(null);
EntityService.patch(A);
A: {"prop1":1, "prop2":null}
EntityService.patch(A)执行后,是DB(的Oracle 11g)没有变化,但我们希望,在DB PROP2将等于空了。
这是一个正常的行为(我想也许是的,因为空值可能理解像没有改变)? 有没有简单的方法来改变这种行为?
正是我发现的,谢谢。更多信息 - https://spring.io/understanding/REST – egorlitvinenko