关于Failed to load property source from location ‘classpath:/application.yml‘解决方案

错误

2021-02-03 16:44:39.317 ERROR 5552 — [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml’
at org.springframework.boot.context.config.ConfigFileApplicationListener L o a d e r . l o a d ( C o n f i g F i l e A p p l i c a t i o n L i s t e n e r . j a v a : 545 )   [ s p r i n g − b o o t − 2.2.5. R E L E A S E . j a r : 2.2.5. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . b o o t . c o n t e x t . c o n f i g . C o n f i g F i l e A p p l i c a t i o n L i s t e n e r Loader.load(ConfigFileApplicationListener.java:545) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE] at org.springframework.boot.context.config.ConfigFileApplicationListener Loader.load(ConfigFileApplicationListener.java:545) [springboot2.2.5.RELEASE.jar:2.2.5.RELEASE]atorg.springframework.boot.context.config.ConfigFileApplicationListenerLoader.loadForFileExtension(ConfigFileApplicationListener.java:494) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE]

错误描述

究其错误还是我们的配置文件出了问题
配置文件出错的几种可能:
1、配置格式出错,位置不对之类的,有空格
2、配置内容出错,字母打错了
3、配置文件的编码不统一,中文注释可能会引起故障
我这里就出现了中文故障问题,我直接删,光溜溜的丝毫不剩:
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值