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之前的冒号(:) ...
随机推荐
- ubuntu 16.04 源代码安装libusb
libusb是一个跨平台的usb通讯库:https://libusb.info/ 在ubuntu16上安装 1. 首先安装 libudev-dev sudo apt-get install libud ...
- [转]你可能不知道的五个强大HTML5 API
一.全屏 // 找到适合浏览器的全屏方法 function launchFullScreen(element) { if(element.requestFullScreen) { element.re ...
- golang sync包
sync 在golang 文档上,golang不希望通过共享内存来进行进程间的协同操作,而是通过channel的方式来进行,当然,golang也提供了共享内存,锁等机制进行协同操作的包: 互斥锁: M ...
- $.ajax()方法详解 ajax之async属性 【原创】详细案例解剖——浅谈Redis缓存的常用5种方式(String,Hash,List,set,SetSorted )
$.ajax()方法详解 jquery中的ajax方法参数总是记不住,这里记录一下. 1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. 2.type: 要求为Str ...
- Centos7.4别名设置提高工作效率
一.打开 .bashrc文件 1.位置:~(cd ~)目录下 2.cat .bashrc 原文件内容如下: # .bashrc # User specific aliases and function ...
- Cordova 项目 加载不出XML文件
解决方法:copy bundle 将文件移除再添加
- Generate google sitemap xml
方式一. XNamespace xNamespace = "http://www.sitemaps.org/schemas/sitemap/0.9"; XNamespace xht ...
- Tensorflow 与Caffe(转)
TensorFlow TensorFlow 是相对高阶的机器学习库,用户可以方便地用它设计神经网络结构,而不必为了追求高效率的实现亲自写 C++或 CUDA 代码.它和 Theano 一样都支持自动求 ...
- hadoop 动态调整mapred参数
bin/hadoop job -set-reduce-capacity job_20151126032920_1142443 1000 调成map数 bin/hadoop job -set-prior ...
- linux c调用 mysql代码
代码: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <mysql/ ...