mysql驱动更新迭代之后驱动,稍微有点变化:

com.mysql.jdbc.Driver (变化为) --> driver-class-name: com.mysql.cj.jdbc.Driver

还有就是另一个报错

The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration

这个是由于时区的问题,之前在SSM中 这样写是没有问题的,

jdbc:mysql://127.0.0.1:3306/jtdb?useUnicode=true&characterEncoding=UTF-8

但是换spring boot之后,可能是自动匹配新版本的原因吧,导致的,更换为

jdbc:mysql://127.0.0.1:3306/jtdb?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
没有问题了,
完整的yml配置数据库的配置
spring:
datasource:
# driver-class-name: com.mysql.jdbc.Driver com.mysql.cj.jdbc.Driver
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: root
url: jdbc:mysql://127.0.0.1:3306/jtdb?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC 做个备忘,防止以后出现类似的问题,节省时间
 

spring-boot 再添加mysql启动器的时候报错, The driver is automatically registered via the SPI and manual loading of the driver class....的更多相关文章

  1. Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class

    Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb ...

  2. Loading class `com.mysql.jdbc.Driver'. This is deprecated. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

    简单介绍 声明:使用JDK9.MYSQL8.idea 报错处理 报错信息如下 原因 提示信息表明数据库驱动com.mysql.jdbc.Driver已经被弃用了.应当使用新的驱动com.mysql.c ...

  3. Eclipse中使用MySql遇到:Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading o

    在Eclipse中使用MySQL遇到了点小问题 如果对Eclipse中配置MySql还有疑问的可以参考一下这篇博客:https://blog.csdn.net/qq_38247544/article/ ...

  4. spingboot启动报驱动Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of th

    原因: springboot应用了最新的驱动com.mysql.cj.jdbc.Driver,这个驱动需要用mysql-connector-java包的6.x版本才可以, 而mysql-connect ...

  5. spring boot 集成 mybatis 单元测试Dao层 控制台报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    最近帮同学做毕业程序,采用后端spring boot + mybatis + H2,将框架搭好进行各层的单元测试时,在dao层就出现了错,如图 于是在网上找各种资料,有的说是xml文件和接口没有一一对 ...

  6. Spring boot 全局配置 properties或者yml文件报错

    主要问题是没有扫描到配置文件 在pom文件里面<build>    </build>中加上以下代码就可以保证能扫描到了 <resources> <resour ...

  7. (45). Spring Boot MyBatis连接Mysql数据库【从零开始学Spring Boot】

    大家在开发的时候,会喜欢jdbcTemplate操作数据库,有喜欢JPA操作数据库的,有喜欢MyBatis操作数据库的,对于这些我个人觉得哪个使用顺手就使用哪个就好了,并没有一定要使用哪个,个人在实际 ...

  8. Spring boot Jpa添加对象字段使用数据库默认值

    Spring boot Jpa添加对象字段使用数据库默认值 jpa做持久层框架,项目中数据库字段有默认值和非空约束,这样在保存对象是必须保存一个完整的对象,但在开发中我们往往只是先保存部分特殊的字段其 ...

  9. (二)阿里云ECS Linux服务器外网无法连接MySQL解决方法(报错2003- Can't connect MySQL Server on 'x.x.x.x'(10038))(自己亲身遇到的问题是防火墙的问题已经解决)

    我的服务器买的是阿里云ECS linux系统.为了更好的操作数据库,我希望可以用navicat for mysql管理我的数据库. 当我按照正常的模式去链接mysql的时候, 报错提示: - Can' ...

随机推荐

  1. IIS+PHP上传文件大小限制和上传时间限制,iis7和iis8上传文件大小限制和上传时间限制

    先说IIS这边的配置                                                                  一:点击站点“管理”下的“配置编辑器”. 二:设 ...

  2. Python网络爬虫——BeautifulSoup4库的使用

    使用requests库获取html页面并将其转换成字符串之后,需要进一步解析html页面格式,提取有用信息. BeautifulSoup4库,也被成为bs4库(后皆采用简写)用于解析和处理html和x ...

  3. 大规模机器学习在LinkedIn预测模型中的应用实践

    预测模型在 LinkedIn 的产品中被广泛应用,如 Feed.广告.工作推荐.邮件营销.用户搜索等.这些模型在提升用户体验时起到了重要的作用.为了满足建模需求,LinkedIn 开发并且开源了 Ph ...

  4. JQuery之选择集过滤

    JQuery选择集过滤应用如下: 代码实现: <script src="JS/jquery-3.4.1.js"></script> <script&g ...

  5. SpringBoot-运行原理(四)

    1.自动配置 (1).pom.xml 在pom文件中 <parent> <groupId>org.springframework.boot</groupId> &l ...

  6. go基础之并发

    1.Goroutines是轻量级线程 2.channels的同步通信 1.Goroutines是轻量级线程 go语句在单独的线程中运行一个函数. 你可以使用go语句启动一个新的执行线程,即一个goro ...

  7. [TimLinux] TCL 自定义包

    1. 包 很多功能存放在一起,定义为一个包,在iTcl(Incr TCL)之后,可以定义一个类,类可以放在一个包里面,包为一个独立的文件,可以为TCL文件,也可以为C/C++语言实现的动态库. 2. ...

  8. [TimLinux] Python 类型与运算

    1. 内建(built-in)数据类型种类 数字类型:int(), float() 顺序(sequence): 字符串:str() 元祖:tuple() 列表:list() 字典:dict() 集合: ...

  9. CodeChef FAVNUM FavouriteNumbers(AC自动机+数位dp+二分答案)

    All submissions for this problem are available. Chef likes numbers and number theory, we all know th ...

  10. HDU3849-By Recognizing These Guys, We Find Social Networks Useful(无向图的桥)

    By Recognizing These Guys, We Find Social Networks Useful Time Limit: 2000/1000 MS (Java/Others)     ...