报错这个:
javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:763)
at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:742)
at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:2249)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4221)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1464)
at com.alibaba.druid.pool.DruidDataSource.close(DruidDataSource.java:2048)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:339)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:273)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:571)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:543)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:1040)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:504)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:1033)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1057)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1026)
at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:945)
** END NESTED EXCEPTION **
在设置jdbc的地方加一个
jdbc.url=jdbc:mysql://localhost:3306/jpa?characterEncoding=UTF-8&useSSL=false
加useSSL=false 就OK