NACOS MalformedInputException 无法读取中文配置问题
Posted exmyth
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了NACOS MalformedInputException 无法读取中文配置问题相关的知识,希望对你有一定的参考价值。
1. 问题描述
在windows平台中打包运行springboot jar包提示如下错误
- 在idea中运行正常
org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:254) ~[snakeyaml-1.19.jar!/:na]
at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:58) ~[snakeyaml-1.19.jar!/:na]
at org.yaml.snakeyaml.Yaml.loadAll(Yaml.java:537) ~[snakeyaml-1.19.jar!/:na]
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:166) ~[spring-beans-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:139) ~[spring-beans-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.beans.factory.config.YamlPropertiesFactoryBean.createProperties(YamlPropertiesFactoryBean.java:135) ~[spring-beans-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.beans.factory.config.YamlPropertiesFactoryBean.getObject(YamlPropertiesFactoryBean.java:115) ~[spring-beans-5.0.12.RELEASE.jar!/:5.0.12.RELEASE]
at org.springframework.cloud.alibaba.nacos.client.NacosPropertySourceBuilder.loadNacosData(NacosPropertySourceBuilder.java:100) [spring-cloud-alibaba-nacos-config-0.9.0.RELEASE.jar!/:0.9.