我是靠谱客的博主 欣慰小土豆,这篇文章主要介绍Hikari连接池yml配置的坑-Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded,现在分享给大家,希望可以做个参考。

 这样配光数据库的读取不到url

我搞了两天都解决不了。。。

结果是配置不兼容

YML应该这样写

spring:
  datasource:
    url: "jdbc:mysql://localhost:3306/2107?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false"
    username: "root"
    password: "1234"
    driver-class-name: "com.mysql.cj.jdbc.Driver"
    # 指定数据连接池类型
    type: com.zaxxer.hikari.HikariDataSource
    hikari:

      maximum-pool-size: 20
      pool-name: "test-hikaricp"

最后

以上就是欣慰小土豆最近收集整理的关于Hikari连接池yml配置的坑-Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded的全部内容,更多相关Hikari连接池yml配置的坑-Failed内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(101)

评论列表共有 0 条评论

立即
投稿
返回
顶部