Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol

Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta-data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

解决办法:

server:
  port: 10086
spring:
  application:
    name: lz-Batch
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    password: root
#    url: jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8&characterEncoding=utf-8
    url: jdbc:mysql://localhost:3306/test?useUnicode=true&useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useAffectedRows=true&allowMultiQueries=true
    username: root

url后面加上这一大串就可以了。

你可能感兴趣的:(ssl,.net,网络协议)