Is it possible to get previous entry in @HandleAfterSave event with Spring Data REST?

Viewed 630

I have next event handler:

@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
    }
}

Is there any way to get old entity in handleAfterSave ?

0 Answers
Related