springboot报错驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接,解决方式

起因:今天发布程序,本地测试没有问题但是部署到服务器上报:驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:"The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]"这个错误

解决方式:

java 复制代码
<dependency>
    <groupId>net.sourceforge.jtds</groupId>
    <artifactId>jtds</artifactId>
    <version>1.3.1</version>
</dependency>
java 复制代码
##数据库连接信息
  datasource:
        driver-class-name: net.sourceforge.jtds.jdbc.Driver
        url: jdbc:jtds:sqlserver://127.0.0.1;DatabaseName=TEST;allowMultiQueries=true&useAffectedRows=true&encrypt=true&trustServerCertificate=true
        username: test
        password: 111111
相关推荐
ladymorgana40 分钟前
【Spring Boot】HikariCP 连接池 YAML 配置详解
spring boot·后端·mysql·连接池·hikaricp
GJCTYU2 小时前
spring中@Transactional注解和事务的实战理解附代码
数据库·spring boot·后端·spring·oracle·mybatis
黑客老李2 小时前
EDUSRC:智慧校园通用漏洞挖掘(涉校园解决方案商)
服务器·前端·网络·安全·web安全
玥轩_5213 小时前
BUUCTF [WUSTCTF2020]spaceclub 1
安全·网络安全·ctf·buuctf·ascii·spaceclub·wustctf2020
薄荷椰果抹茶3 小时前
【网络安全基础】第七章---无线网络安全
网络·安全·web安全
weixin_472339463 小时前
网络安全之重放攻击:原理、危害与防御之道
安全·web安全
sam.li3 小时前
WebView安全实现(一)
android·安全·webview
weixin_472339463 小时前
网络安全之注入攻击:原理、危害与防御之道
安全·web安全
风象南3 小时前
SpringBoot敏感配置项加密与解密实战
java·spring boot·后端
写不出来就跑路5 小时前
暑期实习感悟与经验分享:从校园到职场的成长之路
java·开发语言·经验分享·spring boot