错误
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) [spring−boot−2.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、配置文件的编码不统一,中文注释可能会引起故障
我这里就出现了中文故障问题,我直接删,光溜溜的丝毫不剩: