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
Similar Posts:
- java.lang.IllegalStateException: Failed to load property source from location ‘classpath:/application-dev.yml’
- [Solved] SpringBoot Error: Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.Malforme
- org.springframework.core.log.LogMessage [How to Solve]
- Springboot Failed to parse configuration class [x]
- [Download Files Error] HttpMessageNotWritableException IllegalStateException: COMPLETED
- Springboot: solve the problem of failed to load ApplicationContext
- The Tomcat connector configured to listen on port 8080 failed to start.
- [Solved] java.lang.IllegalStateException: Failed to introspect Class xxxx
- [Solved] No qualifying bean of type ‘org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder’ available: