Test springboot locally, and the startup error is as follows:
21:04:19.284 [restartedMain] ERROR org.springframework.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$Loader.load(ConfigFileApplicationListener.java:545)
......
Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
......
Caused by: java.nio.charset.MalformedInputException: Input length = 1
......
Finally, it is found that the encoding problem of application.yml
file is changed from GBK
to UTF-8