java.lang.IllegalStateException: Failed to load property sou

时间:2021-01-02 18:42:35

导致报错原因就是格式问题,对齐就好了,百度竟然说编码导致的,郁闷

java.lang.IllegalStateException: Failed to load property sou

"C:Program FilesJavajdk1.8.0_101binjava" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=63341 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:IDEAIntellij IDEAlibidea_rt.jar=63343:D:IDEAIntellij IDEAbin" -Dfile.encoding=UTF-8 -classpath "C:Program FilesJavajdk1.8.0_101jrelibcharsets.jar;C:Program FilesJavajdk1.8.0_101jrelibdeploy.jar;C:Program FilesJavajdk1.8.0_101jrelibextaccess-bridge-64.jar;C:Program FilesJavajdk1.8.0_101jrelibextcldrdata.jar;C:Program FilesJavajdk1.8.0_101jrelibextdnsns.jar;C:Program FilesJavajdk1.8.0_101jrelibextjaccess.jar;C:Program FilesJavajdk1.8.0_101jrelibextjfxrt.jar;C:Program FilesJavajdk1.8.0_101jrelibextlocaledata.jar;C:Program FilesJavajdk1.8.0_101jrelibextnashorn.jar;C:Program FilesJavajdk1.8.0_101jrelibextsunec.jar;C:Program FilesJavajdk1.8.0_101jrelibextsunjce_provider.jar;C:Program FilesJavajdk1.8.0_101jrelibextsunmscapi.jar;C:Program FilesJavajdk1.8.0_101jrelibextsunpkcs11.jar;C:Program FilesJavajdk1.8.0_101jrelibextzipfs.jar;C:Program FilesJavajdk1.8.0_101jrelibjavaws.jar;C:Program FilesJavajdk1.8.0_101jrelibjce.jar;C:Program FilesJavajdk1.8.0_101jrelibjfr.jar;C:Program FilesJavajdk1.8.0_101jrelibjfxswt.jar;C:Program FilesJavajdk1.8.0_101jrelibjsse.jar;C:Program FilesJavajdk1.8.0_101jrelibmanagement-agent.jar;C:Program FilesJavajdk1.8.0_101jrelibplugin.jar;C:Program FilesJavajdk1.8.0_101jrelibresources.jar;C:Program FilesJavajdk1.8.0_101jrelibrt.jar;E:IdeaSpacestargetclasses;E:mvnrepositoryorgspringframeworkbootspring-boot-starter-web2.2.0.RELEASEspring-boot-starter-web-2.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-starter2.2.0.RELEASEspring-boot-starter-2.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkbootspring-boot2.2.0.RELEASEspring-boot-2.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-autoconfigure2.2.0.RELEASEspring-boot-autoconfigure-2.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-starter-logging2.2.0.RELEASEspring-boot-starter-logging-2.2.0.RELEASE.jar;E:mvnrepositorychqoslogbacklogback-classic1.2.3logback-classic-1.2.3.jar;E:mvnrepositorychqoslogbacklogback-core1.2.3logback-core-1.2.3.jar;E:mvnrepositoryorgapachelogginglog4jlog4j-to-slf4j2.12.1log4j-to-slf4j-2.12.1.jar;E:mvnrepositoryorgapachelogginglog4jlog4j-api2.12.1log4j-api-2.12.1.jar;E:mvnrepositoryorgslf4jjul-to-slf4j1.7.28jul-to-slf4j-1.7.28.jar;E:mvnrepositoryjakartaannotationjakarta.annotation-api1.3.5jakarta.annotation-api-1.3.5.jar;E:mvnrepositoryorgyamlsnakeyaml1.25snakeyaml-1.25.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-starter-json2.2.0.RELEASEspring-boot-starter-json-2.2.0.RELEASE.jar;E:mvnrepositorycomfasterxmljacksoncorejackson-databind2.10.0jackson-databind-2.10.0.jar;E:mvnrepositorycomfasterxmljacksoncorejackson-annotations2.10.0jackson-annotations-2.10.0.jar;E:mvnrepositorycomfasterxmljacksoncorejackson-core2.10.0jackson-core-2.10.0.jar;E:mvnrepositorycomfasterxmljacksondatatypejackson-datatype-jdk82.10.0jackson-datatype-jdk8-2.10.0.jar;E:mvnrepositorycomfasterxmljacksondatatypejackson-datatype-jsr3102.10.0jackson-datatype-jsr310-2.10.0.jar;E:mvnrepositorycomfasterxmljacksonmodulejackson-module-parameter-names2.10.0jackson-module-parameter-names-2.10.0.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-starter-tomcat2.2.0.RELEASEspring-boot-starter-tomcat-2.2.0.RELEASE.jar;E:mvnrepositoryorgapachetomcatembedtomcat-embed-core9.0.27tomcat-embed-core-9.0.27.jar;E:mvnrepositoryorgapachetomcatembedtomcat-embed-el9.0.27tomcat-embed-el-9.0.27.jar;E:mvnrepositoryorgapachetomcatembedtomcat-embed-websocket9.0.27tomcat-embed-websocket-9.0.27.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-starter-validation2.2.0.RELEASEspring-boot-starter-validation-2.2.0.RELEASE.jar;E:mvnrepositoryjakartavalidationjakarta.validation-api2.0.1jakarta.validation-api-2.0.1.jar;E:mvnrepositoryorghibernatevalidatorhibernate-validator6.0.17.Finalhibernate-validator-6.0.17.Final.jar;E:mvnrepositoryorgjbossloggingjboss-logging3.4.1.Finaljboss-logging-3.4.1.Final.jar;E:mvnrepositorycomfasterxmlclassmate1.5.0classmate-1.5.0.jar;E:mvnrepositoryorgspringframeworkspring-web5.2.0.RELEASEspring-web-5.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkspring-beans5.2.0.RELEASEspring-beans-5.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkspring-webmvc5.2.0.RELEASEspring-webmvc-5.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkspring-aop5.2.0.RELEASEspring-aop-5.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkspring-context5.2.0.RELEASEspring-context-5.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkspring-expression5.2.0.RELEASEspring-expression-5.2.0.RELEASE.jar;E:mvnrepositoryorgslf4jslf4j-api1.7.28slf4j-api-1.7.28.jar;E:mvnrepositoryorgspringframeworkspring-core5.2.0.RELEASEspring-core-5.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkspring-jcl5.2.0.RELEASEspring-jcl-5.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-starter-actuator2.2.0.RELEASEspring-boot-starter-actuator-2.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-actuator-autoconfigure2.2.0.RELEASEspring-boot-actuator-autoconfigure-2.2.0.RELEASE.jar;E:mvnrepositoryorgspringframeworkbootspring-boot-actuator2.2.0.RELEASEspring-boot-actuator-2.2.0.RELEASE.jar;E:mvnrepositoryiomicrometermicrometer-core1.3.0micrometer-core-1.3.0.jar;E:mvnrepositoryorghdrhistogramHdrHistogram2.1.11HdrHistogram-2.1.11.jar;E:mvnrepositoryorglatencyutilsLatencyUtils2.0.3LatencyUtils-2.0.3.jar" com.itmuch.boot.SpringBootDemoApplication
20:42:03.261 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/charsets.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/deploy.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/access-bridge-64.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/cldrdata.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/dnsns.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/jaccess.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/jfxrt.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/localedata.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/nashorn.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/sunec.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/sunjce_provider.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/sunmscapi.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/sunpkcs11.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/ext/zipfs.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/javaws.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/jce.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/jfr.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/jfxswt.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/jsse.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/management-agent.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/plugin.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/resources.jar, file:/C:/Program Files/Java/jdk1.8.0_101/jre/lib/rt.jar, file:/E:/IdeaSpaces/target/classes/, file:/E:/mvnrepository/org/springframework/boot/spring-boot-starter-web/2.2.0.RELEASE/spring-boot-starter-web-2.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-starter/2.2.0.RELEASE/spring-boot-starter-2.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot/2.2.0.RELEASE/spring-boot-2.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-autoconfigure/2.2.0.RELEASE/spring-boot-autoconfigure-2.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-starter-logging/2.2.0.RELEASE/spring-boot-starter-logging-2.2.0.RELEASE.jar, file:/E:/mvnrepository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/E:/mvnrepository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/E:/mvnrepository/org/apache/logging/log4j/log4j-to-slf4j/2.12.1/log4j-to-slf4j-2.12.1.jar, file:/E:/mvnrepository/org/apache/logging/log4j/log4j-api/2.12.1/log4j-api-2.12.1.jar, file:/E:/mvnrepository/org/slf4j/jul-to-slf4j/1.7.28/jul-to-slf4j-1.7.28.jar, file:/E:/mvnrepository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar, file:/E:/mvnrepository/org/yaml/snakeyaml/1.25/snakeyaml-1.25.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-starter-json/2.2.0.RELEASE/spring-boot-starter-json-2.2.0.RELEASE.jar, file:/E:/mvnrepository/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0.jar, file:/E:/mvnrepository/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0.jar, file:/E:/mvnrepository/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar, file:/E:/mvnrepository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.0/jackson-datatype-jdk8-2.10.0.jar, file:/E:/mvnrepository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.10.0/jackson-datatype-jsr310-2.10.0.jar, file:/E:/mvnrepository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.10.0/jackson-module-parameter-names-2.10.0.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-starter-tomcat/2.2.0.RELEASE/spring-boot-starter-tomcat-2.2.0.RELEASE.jar, file:/E:/mvnrepository/org/apache/tomcat/embed/tomcat-embed-core/9.0.27/tomcat-embed-core-9.0.27.jar, file:/E:/mvnrepository/org/apache/tomcat/embed/tomcat-embed-el/9.0.27/tomcat-embed-el-9.0.27.jar, file:/E:/mvnrepository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.27/tomcat-embed-websocket-9.0.27.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-starter-validation/2.2.0.RELEASE/spring-boot-starter-validation-2.2.0.RELEASE.jar, file:/E:/mvnrepository/jakarta/validation/jakarta.validation-api/2.0.1/jakarta.validation-api-2.0.1.jar, file:/E:/mvnrepository/org/hibernate/validator/hibernate-validator/6.0.17.Final/hibernate-validator-6.0.17.Final.jar, file:/E:/mvnrepository/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar, file:/E:/mvnrepository/com/fasterxml/classmate/1.5.0/classmate-1.5.0.jar, file:/E:/mvnrepository/org/springframework/spring-web/5.2.0.RELEASE/spring-web-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/spring-beans/5.2.0.RELEASE/spring-beans-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/spring-webmvc/5.2.0.RELEASE/spring-webmvc-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/spring-aop/5.2.0.RELEASE/spring-aop-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/spring-context/5.2.0.RELEASE/spring-context-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/spring-expression/5.2.0.RELEASE/spring-expression-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/slf4j/slf4j-api/1.7.28/slf4j-api-1.7.28.jar, file:/E:/mvnrepository/org/springframework/spring-core/5.2.0.RELEASE/spring-core-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/spring-jcl/5.2.0.RELEASE/spring-jcl-5.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-starter-actuator/2.2.0.RELEASE/spring-boot-starter-actuator-2.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.2.0.RELEASE/spring-boot-actuator-autoconfigure-2.2.0.RELEASE.jar, file:/E:/mvnrepository/org/springframework/boot/spring-boot-actuator/2.2.0.RELEASE/spring-boot-actuator-2.2.0.RELEASE.jar, file:/E:/mvnrepository/io/micrometer/micrometer-core/1.3.0/micrometer-core-1.3.0.jar, file:/E:/mvnrepository/org/hdrhistogram/HdrHistogram/2.1.11/HdrHistogram-2.1.11.jar, file:/E:/mvnrepository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar, file:/D:/IDEA/Intellij IDEA/lib/idea_rt.jar]
20:42:03.270 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to load property source from location ‘classpath:/application.yml‘
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:545)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:494)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:464)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$7(ConfigFileApplicationListener.java:443)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$8(ConfigFileApplicationListener.java:443)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:440)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$0(ConfigFileApplicationListener.java:335)
at org.springframework.boot.context.config.FilteredPropertySource.apply(FilteredPropertySource.java:54)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:323)
at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:214)
at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:198)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:188)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at com.itmuch.boot.SpringBootDemoApplication.main(SpringBootDemoApplication.java:10)
Caused by: org.yaml.snakeyaml.scanner.ScannerException: mapping values are not allowed here
in ‘reader‘, line 14, column 12:
autohor: monica
^

at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:870)
at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:358)
at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:227)
at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:217)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144)
at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:239)
at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:230)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:218)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144)
at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:85)
at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:125)
at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:548)
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:160)
at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:134)
at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:75)
at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadDocuments(ConfigFileApplicationListener.java:562)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:518)
... 25 common frames omitted

Process finished with exit code 1

解决后运行成功:java.lang.IllegalStateException: Failed to load property sou