SpringCloud启动失败问题如何解决


本篇内容主要讲解“SpringCloud启动失败问题如何解决”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“SpringCloud启动失败问题如何解决”吧!org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:218) ~[snakeyaml-1.27.jar!/:na]
at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:176) ~[snakeyaml-1.27.jar!/:na]
at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:171) ~[snakeyaml-1.27.jar!/:na]
at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:126) ~[snakeyaml-1.27.jar!/:na]
at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:1177) ~[snakeyaml-1.27.jar!/:na]
at org.yaml.snakeyaml.cons免费云主机域名tructor.BaseConstructor.checkData(BaseConstructor.java:123) ~[snakeyaml-1.27.jar!/:na]
at org.yaml.snakeyaml.Yaml$1.hasNext(Yaml.java:507) ~[snakeyaml-1.27.jar!/:na]
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:198) ~[spring-beans-5.3.8.jar!/:5.3.8]
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:166) ~[spring-beans-5.3.8.jar!/:5.3.8]
at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosPropertySource(NacosPropertySourceLocator.java:199) [spring-cloud-starter-alibaba-nacos-config-2021.1.jar!/:2021.1]
com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadExtConfiguration(NacosPropertySourceLocator.java:128) [spring-cloud-starter-alibaba-nacos-config-2021.1.jar!/:2021.1]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [app.jar:1.0.0]

Caused by: java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(Unknown Source) ~[na:1.8.0_311]
at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[na:1.8.0_311]
at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[na:1.8.0_311]
at java.io.InputStreamReader.read(Unknown Source) ~[na:1.8.0_311]
at org.yaml.snakeyaml.reader.UnicodeReader.read(UnicodeReader.java:125) ~[snakeyaml-1.27.jar!/:na]
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:183) ~[snakeyaml-1.27.jar!/:na]
… 41 common frames omitted

2022-02-24 15:50:08.897 ERROR 39048 — [ main] c.a.c.n.c.NacosPropertySourceBuilder : parse data from Nacos error,dataId:dbsource.yml,data:spring:
main:
allow-bean-definition-overriding: true
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
login-username: admin
login-password: admin
reset-enable: falseRoot cause:编码不一致,nacos读取配置文件时默认编码为utf-8,而通过cmd启动项目默认使用gbk。添加-Dfile.encoding=utf-8 启动参数到此,相信大家对“SpringCloud启动失败问题如何解决”有了更深的了解,不妨来实际操作一番吧!这里是百云主机网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

相关推荐: SpringBoot中logback日志怎么保存到mongoDB

本篇内容介绍了“SpringBoot中logback日志怎么保存到mongoDB”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!自定义Appender非常简单,继…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 05/20 15:54
Next 05/20 15:54

相关推荐