1. 本次使用的项目为 gateway
    2. idea中源码运行时正常的
    3. 打包之后启动抛出异常 编码错误 (我配置文件中有中文) ```yaml 2020-08-19 10:52:28.909 ERROR 25120 —- [ main] c.a.c.n.c.NacosPropertySourceBuilder : parse data from Nacos error,dataId:gateway.yaml,dat:spring

    org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1 at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:218) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:176) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:171) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:126) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:1177) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:287) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:227) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:195) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.composer.Composer.checkNode(Composer.java:72) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.constructor.BaseConstructor.checkData(BaseConstructor.java:114) ~[snakeyaml-1.25.jar!/:na] at org.yaml.snakeyaml.Yaml$1.hasNext(Yaml.java:543) ~[snakeyaml-1.25.jar!/:na] at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:160) ~[spring-beans-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:134) ~[spring-beans-5.2.4.RELEASE.jar!/:5.2.4.RELEASE] ```

    1. 解决方法
      1. 删除中文 - 不太现实
      2. 启动命令上加入编码utf-8 eg: java -Dfile.encoding=utf-8 -jar gateway2-0.0.1-SNAPSHOT.jar
        1. 特别注意 要使用 cmd 启动
        2. powershell 会出现 找不到或无法加载主类 .encoding=utf-8