Spring Boot高版本配置数据库连接驱动问题
Posted 盲目的拾荒者
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spring Boot高版本配置数据库连接驱动问题相关的知识,希望对你有一定的参考价值。
之前习惯的配置方式:
控制台报如下警告:
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 is generally unnecessary.
翻译如下:
正在加载类`com.mysql.jdbc.Driver‘。 这已被弃用。 新的驱动程序类是`com.mysql.cj.jdbc.Driver‘。 驱动程序通过SPI(服务提供接口)自动注册,通常不需要手动加载驱动程序类。
意思就是对于现在的搞版本springboot mysql数据库驱动不需要配置
微信公众号
JAVA程序猿成长之路
分享资源,记录程序猿成长点滴。专注于Java,Spring,SpringBoot,SpringCloud,分布式,微服务。
以上是关于Spring Boot高版本配置数据库连接驱动问题的主要内容,如果未能解决你的问题,请参考以下文章
spring boot整合mybitas怎么配置oracle?
带有 MariaDB 的 Spring Boot:驱动程序尚未收到来自服务器的任何数据包
Spring Boot连接数据库,从MySql5.13飞跃到MySql8.0.18的坑