首页 > 数据库 >springboot连接sqlserver2008r2 驱动版本问题。

springboot连接sqlserver2008r2 驱动版本问题。

时间:2024-04-29 20:35:23浏览次数:16  
标签:hibernate springboot jpa spring sqlserver jdbc 版本 sqlserver2008r2

<dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>8.2.2.jre8</version>
        </dependency>

版本比较常见的:8.4.1.jre8

最新的提示:9.2.1.jre8

 

用了上面二个版本,提示WARN  com.microsoft.sqlserver.jdbc.internals.TDS.Channel : TLSv1 was negotiated. Please update server and client to use TLSv1.2 at minimum.

意思:WARN com.microsoft.sqlserver.jdbc.internals。TDS。通道:已协商TLSv1。请更新服务器和客户端以至少使用TLSv1.2

版本有些高了。

 

目前连接的是sqlserver2008 r2的版本,比较老。用 8.2.2.jre8版本,warn消失。

运行时曾报:

Reason: Failed to determine a suitable driver class:设置jre运行时版本跟配制一致解决。(机上有多个jre8的版本的版本)

 

以下是配制:

spring.datasource.url=jdbc:sqlserver://172.16.156.186:1433;databaseName=db;trustServerCertificate=true;useSSL=false
spring.datasource.username=sa
spring.datasource.password=123
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
# Specify the DBMS
spring.jpa.database = SQLSERVER
# Show or not log for each sql query
spring.jpa.show-sql = true
# Hibernate ddl auto (create, create-drop, update)
spring.jpa.hibernate.ddl-auto = update
# Naming strategy
#驼峰会原样生成
spring.jpa.hibernate.naming.physical-strategy = org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# stripped before adding them to the entity manager
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.SQLServer2008Dialect
#启用jpa.open-in-view,改变session的生命周期,当web请求关闭时才结束session。
spring.jpa.open-in-view = true

 

标签:hibernate,springboot,jpa,spring,sqlserver,jdbc,版本,sqlserver2008r2
From: https://www.cnblogs.com/jiduoduo/p/18166603

相关文章

  • SpringBoot配置HTTPS及开发调试
    前言在实际开发过程中,如果后端需要启用https访问,通常项目启动后配置nginx代理再配置https,前端调用时高版本的chrome还会因为证书未信任导致调用失败,通过摸索整理一套开发调试下的https方案,特此分享后端配置生成HTTPS密钥keytool-genkeypair-aliastomcat-keyalgRSA-keysi......
  • IDEA导入springboot项目无法识别resources下的application.yml配置文件
    遇到的问题:IDEA springboot不能读取resources下的yml配置文件如下图,application.yml文件前面的图标并不是springboot配置文件的图标,这就是IDEA没有识别到yml文件 正确的配置文件图标因该是下面这样的可能原因及解决方法: 文件名问题:确保YML文件的名称是正确......
  • mumu模拟器历史版本 下载器、安装包历史版本官方下载
    前言全局说明mumu模拟器历史版本下载器、安装包历史版本一、官网主页:https://mumu.163.com/历史版本:https://mumu.163.com/update/二、说明三、历史版本时间版本下载器下载安装包下载备注2024-04-29V3.8.21.2869MuMuInstaller_3.1.8.0_nochannel-mum......
  • 使用idea 在线创建springboot 项目-需联网
    1.打开idea,点击File,New,Project...2.配置项目名称和地址,配置jdk版本.配置完成点击Next等待导入依赖没有jdk17就下载一下想要在resources目录创建.yml结尾文件,按步骤操作选择Editor->FileandCodeTemplates选择files点击+号,输入名称,和文件类型.......
  • Ubuntu22.04 搭建Kubernetes 1.28版本集群
    依赖安装准备工作需要在所有节点上进行。安装ssh服务安装 openssh-serversudoapt-getinstallopenssh-server修改配置文件vim/etc/ssh/sshd_config找到配置项LoginGraceTime120PermitRootLoginprohibit-passwordStrictModesyes把 prohibit-password ......
  • SpringBoot自动装配原理
     个人理解,SpringBoot就是由Spring和SpringMVC整合而来。开箱即用、简化监控、简化配置、简化部署;约定大于配置;boot脱离了传统Spring手动配置大量的bean,而SpringBoot自动装配改变了繁琐的局面。 SpringBoot的自动配置基于条件注解和自动配置类,它能够根据应用程序的......
  • springboot~redis的hash结构为key设置过期策略
    redis配置文件开启键过期#The"notify-keyspace-events"takesasargumentastringthatiscomposed#ofzeroormultiplecharacters.Theemptystringmeansthatnotifications#aredisabled.##Example:toenablelistandgenericevents,fromthepo......
  • SpringBoot中几种好用的代码生成器(基于Mybatis-plus生成entity、mapper、xml等)
    前言熟悉Spring框架的同学一定都知道MVC开发模式吧,控制器(Controller)、业务类(Service)、持久层(Repository)、数据库映射(Mapper)、各种DO类构成了我们服务端的代码。初学的时候,觉得新鲜手写这些东西不觉得有啥,但是写久了就会觉得很烦。好不容易在数据库中写完了一遍字段,在Java代码又要......
  • MySql版本问题sql_mode=only_full_group_by
    报错:1055Expression#1ofSELECTlistisnotinGROUPBYclauseandcontainsnonaggregatedc错误代码1055原因 select子句中包含GROUPBY子句中没有的列,并且没有使用聚合函数,并且sql_mode=only_full_group_bymysql5.7及之后版本默认启用了only_full_group_bySQL模式,这......
  • SpringBoot常用注解(部分)
     @Service:注解在类上,表示这是一个业务层bean@Controller:注解在类上,表示这是一个控制层bean@Repository:注解在类上,表示这是一个数据访问层bean@Component:注解在类上,表示通用bean,value不写默认就是类名首字母小写@Autowired:按照类型(Spring容器默认单例模......