Spring Boot: Jdbc javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify

前端 未结 10 1212
青春惊慌失措
青春惊慌失措 2021-02-02 08:59

I am currently learning more about implementing JDBC and using databases in a Spring Boot webapp, and I encountered the following Stack Trace written in the bottom of the post.<

10条回答
  •  再見小時候
    2021-02-02 09:24

    I also faced the same issue. if you look the the stacktrace, it's cleary mentioned what to do -

    Sat Mar 16 09:00:01 IST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. 
    You need either to explicitly disable SSL by setting **useSSL=false**, or set **useSSL=true** and provide truststore for server certificate verification.
    

    so after disabling the ssl by making changes in data source url solved the problem -

    spring.datasource.url=jdbc:mysql://localhost:3306/security?useSSL=false
    

提交回复
热议问题