Spring Boot 踩过的坑(一)
[main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath:
...
Caused by: org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
...
Caused by: java.nio.charset.MalformedInputException: Input length = 1
在使用Application.yml设置配置参数时产生的异常,其实这是就是配置文件编码的原因,我们打开IDEA的setting查看File Ecodings
项目全局是UTF-8的编码,而此文件的编码是GBK,由于你的Application.yml文件中在涉及了中文(包含中文注释也不行),说以去掉这一部分或修改编码方式