<span style="background-color: rgb(255, 255, 255);">To prevent the methods be triggered twice, we need to overwrite the </span><strong style="background-color: rgb(255, 255, 255);">publishEvent(ApplicationEvent event)</strong><span style="background-color: rgb(255, 255, 255);"> method, then remove the code below</span>
Spring - Spring Data REST - Prevent The Methods in Event Handlers Be Triggered Twice
To prevent the methods be triggered twice, we need to overwrite the publishEvent(ApplicationEvent event) method, the remove the code below: this.getApplicationEventMulticaster().multicastEvent(event