0

I've created a spring-boot service that connect with mongoDB offering an APIRest to the front end application. When i run the JAR file it took too long to provide the service. So i wanted to know if there is a away to notify the user that service is ready.

  • See the answers [here](https://stackoverflow.com/questions/8686507/how-to-add-a-hook-to-the-application-context-initialization-event). You need to handle the ContextRefreshedEvent. You can, maybe, send a websocket notification in the handler. – Islam Hassan Oct 17 '19 at 16:06
  • What's the main role for this ContextRefreshedEvent? – user192443 Oct 30 '19 at 13:43
  • It's an event that gets published by Spring when the ApplicationContext is initialized or refreshed. See section 1.15.2 [here](https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#context-introduction). – Islam Hassan Oct 30 '19 at 15:23

0 Answers0