诺虫的箱子

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  97 随笔 :: 4 文章 :: 4 评论 :: 56336 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

 

解决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.警告问题

错误提示:Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb

 

 

Class.forName("com.mysql.cj.jdbc.Driver");


解决方式:

报错意思就是说com.mysql.jdbc.Driver这个驱动已经被弃用了,新的驱动为com.mysql.cj.jdbc.Driver,通常是自动注入的。

所以,我们只需要按照提示,将“com.mysql.jdbc.Driver”驱动改为“com.mysql.cj.jdbc.Driver”。

 


————————————————
版权声明:本文为CSDN博主「临易i」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/LYly_B/article/details/125723701

posted on   诺虫的箱子  阅读(65)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
历史上的今天:
2021-04-22 Order allow,deny Allow from all错
点击右上角即可分享
微信分享提示