Spring MVC
Listening to events on HTTP request in Spring MVC application.
import org.springframework.context.event.EventListener;import org.springframework.stereotype.Component;import org.springframework.web.context.support.RequestHandledEvent;@Componentpublic class MyBean { @EventListener public void handleEvent (RequestHandledEvent e) { System.out.println("-- RequestHandledEvent --"); System.out.println(e); }}