主要异常信息:
java.lang.IllegalStateException: Failed to load property source from 'file:/D:/MyProject/vip-springcloud/configserverdemo/target/classes/application.yml' (classpath:/application.yml)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:554) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:499) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at com.example.configserverdemo.ConfigServerDemoApplication.main(ConfigServerDemoApplication.java:13) [classes/:na]
Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:218) ~[snakeyaml-1.26.jar:na]
at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:176) ~[snakeyaml-1.26.jar:na]
Caused by: java.nio.charset.MalformedInputException: Input length = 1
at
在yml文件里面是不能出现中文字符的,去掉后重新启动项目即可。