0

I have spring boot application, as part of my application I have mysql database. Sometimes I forgot to open mysql port, due to this my app failed to start

com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:590)

It should start with warning message, thanks in advance.

Hannoun Yassir
  • 20,583
  • 23
  • 77
  • 112
Vignesh
  • 1,046
  • 9
  • 18
  • 2
    Possible duplicate of [How to start spring-boot app without depending on Database?](https://stackoverflow.com/questions/23850585/how-to-start-spring-boot-app-without-depending-on-database) – Nico Van Belle Jun 12 '17 at 12:21
  • 2
    Even if you manage to start it without any error, it will fail when an actual request is performed. I'd rather have it fail at startup than fail at runtime. – Darshan Mehta Jun 12 '17 at 12:24

0 Answers0