Caused by: java.nio.charset.MalformedInputException: Input length = 1
时间: 2023-10-15 11:25:20 浏览: 195
Android Caused by: java.lang.ClassNotFoundException解决办法
Caused by: java.nio.charset.MalformedInputException: Input length = 1是一个错误信息,在启动springboot项目时可能会出现。这个错误通常是由于字符编码不统一导致的。 解决这个问题的方法有以下几种:
1. 将application.yml文件的编码格式改为UTF-8。
2. 如果你的application.yml文件是通过把其他类型的文件后缀名直接改为yml生成的,那么你需要将application.yml中的内容复制并删除,然后新建一个application.yml文件,并将复制的内容粘贴进去。这样运行项目就不会报错了。
3. 从根本上解决问题:进入IDEA的设置中,找到Editor -> File Encodings,将编码格式修改为正确的格式,如UTF-8。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [java bug汇总——Caused by: java.nio.charset.MalformedInputException: Input length = 1](https://blog.csdn.net/qq_44633541/article/details/124948573)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [springboot Caused by: java.nio.charset.MalformedInputException: Input length = 1](https://blog.csdn.net/yaoyulan21/article/details/114369416)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文