mysql5.0

1、#mysql数据库连接
2、spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 
3、spring.datasource.url=jdbc:mysql://localhost:3306xxxx
 
4、spring.datasource.username=root
 
5、spring.datasource.password=123456
 
mysql8.0
1、spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 
2、spring.datasource.url=jdbc:mysql://localhost:3306/xxxx?serverTimezone=GMT%2B8
 
3、spring.datasource.username=root
 
4、spring.datasource.password=123456
 

注意:

1、这里的 url 使用了 ?serverTimezone=GMT%2B8 后缀,因为Spring Boot 2.1 集成了 8.0版本的jdbc驱动,这个版本的 jdbc 驱动需要添加这个后缀,否则运行测试用例报告如下错误:

java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more

2、这里的 driver-class-name 使用了  com.mysql.cj.jdbc.Driver ,在 jdbc 8 中 建议使用这个驱动,之前的 com.mysql.jdbc.Driver 已经被废弃,否则运行测试用例的时候会有 WARN 信息

最新文章

  1. Android版本与api Level
  2. [.net 面向对象程序设计进阶] (19) 异步(Asynchronous) 使用异步创建快速响应和可伸缩性的应用程序
  3. Linux下apache+phppgadmin安装配置
  4. 《oracle每日一练》oracle截取字符的函数
  5. MFC 中控件的启用与禁用
  6. Thread的六种状态
  7. How can I work smarter, not just harder? Ask it forever
  8. Hadoop on Mac with IntelliJ IDEA - 1 解决input path does not exist问题
  9. DOM事件逐层上机传递
  10. QT5新手上路(1)安装
  11. Graham算法—二维点集VC++实现
  12. codeforces 609F. Frogs and mosquitoes 二分+线段树
  13. 三、nginx301跳转302跳转
  14. 7.数据本地化CCString,CCArray,CCDictionary,tinyxml2,写入UserDefault.xml文件,操作xml,解析xml
  15. Java 判断回文字符串有多少和其中的最大字符串
  16. HashSet集合
  17. 机器学习 —— 类不平衡问题与SMOTE过采样算法
  18. HDU 6113 度度熊的01世界
  19. PHP Session 常用的函数
  20. 从壹开始前后端分离 [ Vue2.0+.NET Core2.1] 十四 ║ VUE 计划书 & 我的前后端开发简史

热门文章

  1. AutumnWater 秋水SRC平台
  2. secret_key伪造session来进行越权
  3. 小程序image无法显示图片
  4. Codeforces Round #631 (Div. 1) A-C
  5. Acwing 405. 将他们分好队
  6. protobuf 协议浅析
  7. 一篇文章掌握Nginx核心文件结构
  8. 数据结构与算法——循环链表的算法实现(Joseph 问题)
  9. 总结 Visual Studio 2019 发布以来 XAML 工具的改进
  10. 日期格式化:推荐使用SimpleDateFormat