将provider打包部署到Linux,在启动它的时候报一堆错误:
我在IDEA运行正常,打包部署上去启动时就报连接jdbc错误。。。
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-03-16 05:04:26.762 ERROR 7203 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Caused by: java.net.ConnectException: 拒绝连接 (Connection refused)