当前位置: 首页 > article >正文

SpringBoot启动失败之application.yml缩进没写好

修改前:
在这里插入图片描述
spring前面空格了
报错输出:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

Action:

Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

修改后:在这里插入图片描述

总结
YAML文件对缩进非常敏感,必须使用空格(通常为2个空格)来表示层次结构,不能使用Tab键。


http://www.kler.cn/a/558370.html

相关文章:

  • brew Nushell mac升级版本
  • 前端排序算法完全指南:从理论到实践
  • Docker 的安全配置与优化(二)
  • 【微服务优化】ELK日志聚合与查询性能提升实战指南
  • DeepSeek写俄罗斯方块手机小游戏
  • 选择排序和计数排序
  • sysaux表空间处理流程
  • MySQL 中的索引数量是否越多越好?
  • 抽象类、接口、枚举
  • kafka+spring cloud stream 发送接收消息
  • edge浏览器将书签栏顶部显示
  • 八大排序算法(1)插入排序-直接插入排序 和 希尔排序
  • 探索火山引擎 DeepSeek-R1 满血版:流畅、高效的 AI 开发体验
  • 当 OpenAI 不再 open,DeepSeek 如何掀起 AI 开源革命?
  • Java-如何将其他地方拉取的jar包导入本地maven环境
  • eBPF加速的边缘计算网络:构建5G时代的微秒级传输引擎
  • 【算法】初等数论
  • REACT--组件通信
  • yum报错:bash: /usr/bin/yum: /usr/bin/python: 坏的解释器:没有那个文件或目录
  • 自动化合约生成与管理:AI与Python的完美结合