javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer‘s close

    科技2024-12-25  3

    1. 问题描述:

    ** 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.Alert.createSSLException(Alert.java:133) at sun.security.ssl.Alert.createSSLException(Alert.java:117) at sun.security.ssl.TransportContext.fatal(TransportContext.java:314) at sun.security.ssl.TransportContext.fatal(TransportContext.java:270) at sun.security.ssl.TransportContext.fatal(TransportContext.java:261) at sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:656) at sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:635) at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:2246) at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4237) at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1465) at com.iteima.jdbc.JdbcDemo1.main(JdbcDemo1.java:42) ** END NESTED EXCEPTION **

    2.解决方法:

    将设置useSSL为false

    jdbc:mysql://localhost:3306/eesy?serverTimezone=GMT%2B8&useSSL=false

    注意 :若配置文件是xml格式,xml文件中&是被禁止的,需要用到它的转义字符"&"

    jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8&useSSL=false

    参考文献: https://blog.csdn.net/qq_38892496/article/details/89818175 感谢楼主分享!

    Processed: 0.085, SQL: 8