spring: datasource: driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver url: jdbc:sqlserver://IP:1433;databaseName=数据库名;trustServerCertificate=true username: 账号 password: 密码
mybatis: mapper-locations: classpath:mapper/*.xml type-aliases-package: com.jinawei.sanbian.entity 实体类包 configuration: map-underscore-to-camel-case: true server: port: 8888 mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]”。
修改java.security文件
jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
include jdk.disabled.namedCurves
把其中的 TLSv1, TLSv1.1,3DES_EDE_CBC 删除保存