mysql
mysql-connector-java
runtime
在mysql5中,在项目创建后由指定添加的依赖版本:
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
<scope>runtime</scope>
spring.datasource.driver-class-name配置还有要注意的一点,在mysql5中,jdbc连接mysql5是com.mysql.jdbc.Driver,而mysql6以及以上是com.mysql.cj.jdbc.Driver,并且在url之后要指定时区。
再添加一个依赖:
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
#MYSQL6以上配置
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/你的数据库?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=
#MYSQL5配置
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/你的数据库?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=
连接测试:
打开你的入口文件,中文部分替换为你自己的相应内容
# Kafka实战笔记
> **关于这份笔记,为了不影响大家的阅读体验,我只能在文章中展示部分的章节内容和核心截图,如果你需要完整的pdf版本,[戳这里即可免费领取](https://gitee.com/vip204888/java-p7)。**
![image.png](https://img-blog.csdnimg.cn/img_convert/7b4845a04b25989017f71cdc99d415da.png)
* **Kafka入门**
* **为什么选择Kafka**
* **Karka的安装、管理和配置**
![image.png](https://img-blog.csdnimg.cn/img_convert/a47a94bf750d510fb340c4c1ddb3ea61.png)
* **Kafka的集群**
* **第一个Kafka程序**
* ![image.png](https://img-blog.csdnimg.cn/img_convert/8c083a7d8b108823dcadd15844a15db8.png)
afka的生产者
![image.png](https://img-blog.csdnimg.cn/img_convert/47c392aa1c66aa221073863908c62f9e.png)
* **Kafka的消费者**
* **深入理解Kafka**
* **可靠的数据传递**
![image.png](https://img-blog.csdnimg.cn/img_convert/63aedd43331c1eaf90000bde8349be7e.png)
![image.png](https://img-blog.csdnimg.cn/img_convert/1e478d0128d41392f712a9a45e16d7c8.png)
* **Spring和Kalka的整合**
* **Sprinboot和Kafka的整合**
* **Kafka实战之削峰填谷**
* **数据管道和流式处理(了解即可)**
![image.png](https://img-blog.csdnimg.cn/img_convert/3d6735aaac1f3ed2d9480ea0bfa3d4fa.png)
* **Kafka实战之削峰填谷**
![image.png](https://img-blog.csdnimg.cn/img_convert/23988918d586ae38ef8610737d6003d3.png)
据管道和流式处理(了解即可)**
[外链图片转存中...(img-6UBCq4fN-1628093069821)]
* **Kafka实战之削峰填谷**
[外链图片转存中...(img-AHbr4tE5-1628093069822)]