Reputation: 486
I have application in Spring Boot. After initialization of Spring Boot with embeded tomcat, the first response is very slow. How can I fix it? Has spring boot any warmup command/mode? I am thinking too about connection with database and I am wondering about connection database, probably spring connects with Postgres during first request.
Upvotes: 3
Views: 4901
Reputation: 36223
You could either use ApplicationRunner or CommandlineRunner to run something on startup:
Upvotes: 2