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
相关推荐
xixixi777773 分钟前
安全嵌入全链路:从模型训练到智能体交互,通信网络是AI安全的“地基”
人工智能·安全·ai·多模态·数据·通信·合规
1941s8 分钟前
OpenClaw 每日新玩法 | NanoClaw —— 轻量级、安全的 OpenClaw 替代方案
人工智能·安全·agent·openclaw
Agent产品评测局19 分钟前
企业 AI Agent 落地,如何保障数据安全与合规?——企业级智能体安全架构与合规路径深度盘点
人工智能·安全·ai·chatgpt·安全架构
吾日三省Java1 小时前
SpringBoot锁设计:让你的系统不再“抢”出问题!
java·spring boot·设计思路
java1234_小锋1 小时前
Java高频面试题:谈谈你对SpringBoot的理解?
java·开发语言·spring boot
彭于晏Yan2 小时前
SpringBoot整合ECC实现文件签名与验签
java·spring boot·后端
jiankeljx2 小时前
Spring Initializr创建springboot项目,提示java 错误 无效的源发行版:16
java·spring boot·spring
skiy2 小时前
springboot+全局异常处理
java·spring boot·spring
xianjian09122 小时前
springboot与springcloud以及springcloudalibaba版本对照
spring boot·后端·spring cloud
聊点儿技术2 小时前
游戏账号盗用频发,IP风险等级评估如何成为第一道防线?
安全·游戏·ip地址·风险评估·账号安全·ip风险等级评估