是否可以使用Spring Data REST获取@HandleAfterSave事件的先前条目?

时间:2017-11-16 08:08:05

标签: spring-data-rest

我有下一个事件处理程序:

@Component
@RepositoryEventHandler
public class EntityEventHandler {

    private final EntityService entityService;

    @HandleAfterSave
    public void handleAfterSave(final Entity entity) {
        // need old entity here to validate if specific field has changed
    }
}

有没有办法在handleAfterSave中找到旧实体?

0 个答案:

没有答案