I am running Tomcat 9 with Sring 5.0.4 and Jdk 1.8 Need to execute code after ServletContext initialization is completed.
I have tried
<load-on-startup>1</load-on-startup>
for a servlet and tried executing my code from its init method. However, this is executed before I see the below line in logs
org.apache.catalina.startup.Catalina.start Server startup
I have also encountered the below solution on this forum to annotate a method, but it's applicable only for spring boot.
@EventListener(ApplicationReadyEvent.class)
Any pointers to an equivalent solution in spring will be really greatful