javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer's close_notify

今天用 generator 逆向生成的时候遇到一个报错,虽然不影响生成但是看着就是有点难受(强迫症)

** 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 java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)
        at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
        at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)
        at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:645)
        at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:624)
        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 org.mybatis.generator.config.Context.closeConnection(Context.java:535)
        at org.mybatis.generator.config.Context.introspectTables(Context.java:468)
        at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.java:222)
        at org.mybatis.generator.api.ShellRunner.main(ShellRunner.java:117)


** END NESTED EXCEPTION **

原因

JDBC与MYSQL版本不兼容,MYSQL版本太高...

解决方法

将设置useSSL为false

generator.xml 解决代码

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

注意 :xml文件中&是被禁止的需要用到它的转义字符"&"

若不是xml格式 解决代码

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

参考: https://blog.csdn.net/qq_34075488/article/details/85106860

            https://blog.csdn.net/qq_20367813/article/details/80193574

你可能感兴趣的:(错误日志,Mybatis)