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

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.lryc.cn/news/539686.html

相关文章:

  • 【JavaScript】《JavaScript高级程序设计 (第4版) 》笔记-Chapter17-事件
  • 鸿蒙开发:V2版本装饰器之@Monitor装饰器
  • 51单片机-外部中断
  • UE C++ UObject 功能的初步总结(结合官方文档)
  • DeepSeek和ChatGPT的全面对比
  • Spring Boot Actuator 监控✨
  • 构建高效 Python Web 应用:框架与服务器的选择及实践
  • LED灯闪烁实验:Simulink应用层开发
  • 在做题中学习(89):螺旋矩阵
  • 使用EasyExcel和多线程实现高效数据导出
  • rabbitmq五种模式的实现——springboot
  • 每日学习Java之一万个为什么
  • 寒假学习总结
  • Java Web开发实战与项目——用户认证与授权模块开发
  • 力扣每日一题【算法学习day.129】
  • uni-app发起网络请求的三种方式
  • 字节火山云DeepSeek接入教程,支持联网,速度超快。
  • C语言指针学习笔记
  • FreeRTOS-rust 编译分析
  • 【解决方法】vite-plugin-svg-icons使用中出现问题[vite] Cannot find package ‘fast-glob‘
  • [Qt] 使用QUndoStack运行到cmd->isObsolete()崩溃
  • 大白话实战Sentinel
  • DL/CV领域常见指标术语(FLOPS/mIoU/混淆矩阵/F1-measure)------一篇入门
  • SprutCAMX16数控软件介绍
  • Miniconda + VSCode 的Python环境搭建
  • TRELLIS 部署笔记
  • 深入解析Qt事件循环
  • Visual Studio Code 集成 Baidu Comate
  • 「正版软件」PDF Reader - 专业 PDF 编辑阅读工具软件
  • Kafka消息服务之Java工具类