SpringMVC+MyBatis+Druid使用MySQL8.0.11版本
1、使用MySQL8.0.11版本,要使用5.1.45或其他高版本驱动jar包,我本地使用的是最新的8.0.11

2、更换了MySQL驱动后,报Cannot find class [com.alibaba.druid.pool.DruidDataSource] for bean ················类似错误
然后就更新druid包到1.1.10版本,此处要查看maven上druid包1.1.10版对应的MySQL驱动包版本、MyBatis版本、及Spring版本



<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.</modelVersion> <groupId>cn.ittutu</groupId>
<artifactId>ittutu</artifactId>
<version>1.0-SNAPSHOT</version> <properties>
<project.build.sourceEncoding>UTF-</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-</project.reporting.outputEncoding>
<maven.compiler.encoding>UTF-</maven.compiler.encoding>
<spring.version>4.3..RELEASE</spring.version>
</properties> <dependencies> <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.</version>
</dependency> <dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.</version>
</dependency> <dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.</version>
</dependency> <dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.</version>
</dependency> <dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.</version>
</dependency> <dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.</version>
<scope>provided</scope>
</dependency> <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.</version>
</dependency> <dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.</version>
</dependency> </dependencies> <build>
<finalName>ittutu</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build> </project>
pom.xml
3、此时可以正常操作数据库了,但是后台会有提示信息:
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.
那么就把MySQL驱动类换成com.mysql.cj.jdbc.Driver即可

SpringMVC+MyBatis+Druid使用MySQL8.0.11版本的更多相关文章
- 关于mysql8.0.11版本在win10安装
新的mysql版本没有.exe文件一键安装,网上找了教程,自己搞了下 首先是在菜鸟教程 http://www.runoob.com/mysql/mysql-install.html 根据它的提示下载w ...
- win10 压缩包安装mysql8.0.11报错:Access denied for user 'root'@'localhost'
按这篇:https://blog.csdn.net/Myuhua/article/details/84792121#commentsedit 这里精简下,还有update语句中authenticati ...
- windows一机多装mysql,5.5+版本,8.0.11版本
00.安装第一个mysql,压缩版或者安装版,过程省略,目录如下: 运行中输入“regedit” 进入后,找到 HKEY_LOCAL_MACHINE\SYSTEM\CurrentCont ...
- Mysql8.0.11安装以及注意事项
一.环境配置 首先在官网下载最新的mysql8.0.11数据库,解压到你需要放置的盘符最好不要有中文,然后新建MYSQL_HOME,参数为mysql解压后安装文件的bin文件路径如我的:变量名:MYS ...
- mysql学习(2)-Navicat Premium 12 链接MySQL8.0.11数据库报2059错误
Navicat Premium 12 链接MySQL8.0.11数据库报2059错误 1,问题现象 安装完MySQL8.0.11和Navicat Premium12后,我们会用Navicat去测试连接 ...
- MYSQL8.0以上版本ROOT密码报错及修改
在登录数据库过程中,如果遇到忘记root密码时,该如何解决? 1.使用管理员权限打开命令提示符,在命令行中输入: net stop mysql 2.待mysql服务停止后,输入: mysqld -- ...
- Linux(CentOS-8)安装MySQL8.0.11
CentOS安装MySQL8.0.11 总的思路就是:安装MySQL,编写配置文件,配置环境变量,成功开启服务,登陆并修改ROOT密码 开启远程访问的思路就是:授权用户所有IP都可以访问,系统的数据库 ...
- [linux]centos7.4上安装MySQL-8.0.11【完美安装】
版本声明 centos7.4 MySQL-8.0.11 1.我用的阿里云的虚拟主机,刚从windows换到linux,需要装下常用工具 #安装下sz rz常用到上传下载的命令 yum install ...
- [转载]Linux 环境下编译 0.11版本内核 kernel
最近在看<.如果Clobber/Modify 为空,则其前面的冒号(:)必须省略. 2.如果Output,Input,Clobber/Modify都为空,Output,Input之前的冒号(:) ...
随机推荐
- openssl RSA密钥格式PKCS1和PKCS8相互转换
RSA私钥格式PKCS1和PKCS8相互转换 RSA公钥格式PKCS1和PKCS8相互转换 以下转换基于openssl命令的操作: 1. openssl 生成pkcs1格式的私钥,密钥长度1024位, ...
- 如何卸载EXCEL中的插件?
1.问题:每一次启动,excel都会弹出一个提示框,是因为将treeplan给删除了.找不到. 2.解决办法: 1)在加载项界面,点击转到.就进入自己加载的工具界面 2)将相应项前面的勾取消--但某插 ...
- phpBB3导入版面的Python脚本
关联的数据表 在phpBB3中导入版面时, 需要处理的有两张表, 一个是 forums, 一个是 acl_groups. 如果是干净的论坛, 可以不保留安装时填入的默认分区和版面, 直接用以下语句初始 ...
- 【mysql】不可不知的Metadata Lock
一.问题发生 说一个现象,当收到服务器报警之后,数据库服务器CPU使用超过90%,通过 show processlist 一看,满屏都是 Waiting for table metadata lock ...
- 【ThinkPHP】解析ThinkPHP5创建模块
在根目录下有一个build.php文件,该文件是自动生成的,自动创建模块.build.php的文件内容如下: <?php return [ // 生成应用公共文件 '__file__' => ...
- 【Android】解析AccessibilityService(辅助服务)的使用
辅助功能是Android系统提供的一种服务,派生自Service类.这个服务提供了增强的用户界面,目的是为了帮助残障人士.它一般提供了页面元素查找功能和元素点击功能. 通过辅助功能,开发者可以实现一些 ...
- Android 提高 gradle 的编译速度
随着项目在国内各个商店上线,开始介入了渠道的概念. 目前总共有 13 家商店,尝试使用 ./gradlew assembleRelease 命令打包,耗时将近 40 分钟. 因此搜索了一些可以提供编译 ...
- SQL递归方式实现省市区县级别查询
数据库脚本 CREATE TABLE [dbo].[Std_Area]( [Id] [int] NOT NULL, [Name] [nvarchar](50) NULL, [ParentId] [in ...
- Docker入门简记
Docker的容器环境实际上是借助类Linux命名空间,将各种系统资源按照容器不同划分了不同的命名空间进行隔离,为各个进程提供独立的运行环境关键概念:容器,镜像两个概念一起看,镜像好比平常系统中的各个 ...
- 【转载】最强NLP预训练模型!谷歌BERT横扫11项NLP任务记录
本文介绍了一种新的语言表征模型 BERT--来自 Transformer 的双向编码器表征.与最近的语言表征模型不同,BERT 旨在基于所有层的左.右语境来预训练深度双向表征.BERT 是首个在大批句 ...