在项目打包时,报如下错误:文章来源:https://www.toymoban.com/news/detail-773617.html
** BEGIN NESTED EXCEPTION **
javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify
STACKTRACE:
javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
at sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:740)
at sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:719)
at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1312)
at com.mysql.cj.NativeSession.quit(NativeSession.java:182)
at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)
at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)
at com.zaxxer.hikari.pool.PoolBase.quietlyCloseConnection(PoolBase.java:143)
at com.zaxxer.hikari.pool.HikariPool.lambda$closeConnection$1(HikariPool.java:451)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
** END NESTED EXCEPTION **
解决方法为数据库连接参数useSSL改为false。
说明:高版本的MySQL驱动(>=8.0.13)默认情况下useSSL是true,这里需要明确设置useSSL=false。文章来源地址https://www.toymoban.com/news/detail-773617.html
url: jdbc:mysql://localhost:3306/book_manage?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
到了这里,关于javax.net.ssl.SSLException: closing inbound before receiving peer‘s close_notify异常解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!