我有下一个事件处理程序:
@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
中找到旧实体?