当前位置: 首页 > 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.dtcms.com/a/27010.html

相关文章:

  • 学习kafka和flink
  • 从零搭建微服务项目Base(第7章——微服务网关模块基础实现)
  • 硬核技术组合!用 DeepSeek R1、Ollama、Docker、RAGFlow 打造专属本地知识库
  • zyNo.25
  • 卷积神经网络之AlexNet经典神经网络,实现手写数字0~9识别
  • 鸿蒙NEXT开发-网络管理
  • 嵌入式面试高频面试题:嵌入式系统调试方法大全
  • MySQL 主从复制原理及其工作过程
  • makefile+LSF
  • SpringBoot2.0整合Redis(Lettuce版本)
  • 前端504错误分析
  • 23种设计模式 - 命令模式
  • k8s学习记录(二):Pod基础篇
  • Go 之 Windows下 Beego 项目的搭建
  • 鸿蒙状态管理概述 v2
  • 计算机组成原理——输入/输出系统(十六)
  • 【分布式】Hadoop完全分布式的搭建(零基础)
  • Windows 11运行《拳皇98UM》等老游戏闪退解决方案
  • 《运维工程师如何利用DeepSeek实现智能运维:分级实战指南》
  • qt的下载安装详细介绍
  • 8.【线性代数】——求解Ax=b
  • C++:类之间的关系
  • 基于golang语言开发publicChain项目实战教程
  • Aseprite绘画流程案例(3)——卡通独角兽可爱
  • python入门笔记4
  • glob 用法技巧
  • 撕碎QT面具(4):horizontal Layout修改各个控件的比例大小
  • 【Golang 面试题】每日 3 题(五十九)
  • 以deepseek为例的AI学习及公司知识库的搭建
  • Golang 相关的github 开源项目