zoukankan      html  css  js  c++  java
  • Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.

    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 is generally unnecessary.

    2、原因分析:
      从翻译可知是驱动 com.mysql.jdbc.Driver 已被废弃,不再建议使用了(并非不可使用),推荐使用新的 MySQL JDBC 驱动 com.mysql.cj.jdbc.Driver,新的驱动可借助 SPI 自动注册并不再需要手动加载驱动。
      需要说明的是这个不是错误,而是一个警告信息。

    3、解决办法:
      我们将 MySQL 配置中的 com.mysql.jdbc.Driver 替换成 com.mysql.cj.jdbc.Driver 即可。

  • 相关阅读:
    MongoDB入门
    MongoDB基础命令
    MongoDB查询
    MongoDB索引
    MongoDB聚合
    MongoDB进阶
    Elasticsearch简介与安装
    ElasticSearch索引
    shiro xml标准配置
    shiro双realm验证
  • 原文地址:https://www.cnblogs.com/hapday/p/13303765.html
Copyright © 2011-2022 走看看