使用SpringBoot的yml文件配置时踩的一个坑 :报错如下
E:\java\jdk\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:E:\idea\lib\idea_rt.jar=50290:E:\idea\bin -Dfile.encoding=UTF-8 -classpath E:\java\jdk\jre\lib\charsets.jar;E:\java\jdk\jre\lib\deploy.jar;E:\java\jdk\jre\lib\ext\access-bridge-64.jar;E:\java\jdk\jre\lib\ext\cldrdata.jar;E:\java\jdk\jre\lib\ext\dnsns.jar;E:\java\jdk\jre\lib\ext\jaccess.jar;E:\java\jdk\jre\lib\ext\jfxrt.jar;E:\java\jdk\jre\lib\ext\localedata.jar;E:\java\jdk\jre\lib\ext\nashorn.jar;E:\java\jdk\jre\lib\ext\sunec.jar;E:\java\jdk\jre\lib\ext\sunjce_provider.jar;E:\java\jdk\jre\lib\ext\sunmscapi.jar;E:\java\jdk\jre\lib\ext\sunpkcs11.jar;E:\java\jdk\jre\lib\ext\zipfs.jar;E:\java\jdk\jre\lib\javaws.jar;E:\java\jdk\jre\lib\jce.jar;E:\java\jdk\jre\lib\jfr.jar;E:\java\jdk\jre\lib\jfxswt.jar;E:\java\jdk\jre\lib\jsse.jar;E:\java\jdk\jre\lib\management-agent.jar;E:\java\jdk\jre\lib\plugin.jar;E:\java\jdk\jre\lib\resources.jar;E:\java\jdk\jre\lib\rt.jar;F:\project\java\resource-app\target\classes;F:\repo\com\alibaba\druid-spring-boot-starter\1.2.6\druid-spring-boot-starter-1.2.6.jar;F:\repo\com\alibaba\druid\1.2.6\druid-1.2.6.jar;F:\repo\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;F:\repo\org\springframework\boot\spring-boot-autoconfigure\1.5.12.RELEASE\spring-boot-autoconfigure-1.5.12.RELEASE.jar;F:\repo\org\springframework\boot\spring-boot\1.5.12.RELEASE\spring-boot-1.5.12.RELEASE.jar;F:\repo\eu\bitwalker\UserAgentUtils\1.21\UserAgentUtils-1.21.jar;F:\repo\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.1.4\mybatis-spring-boot-starter-2.1.4.jar;F:\repo\org\springframework\boot\spring-boot-starter\2.4.0\spring-boot-starter-2.4.0.jar;F:\repo\org\springframework\boot\spring-boot-starter-logging\2.4.0\spring-boot-starter-logging-2.4.0.jar;F:\repo\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;F:\repo\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;F:\repo\org\apache\logging\log4j\log4j-to-slf4j\2.13.3\log4j-to-slf4j-2.13.3.jar;F:\repo\org\apache\logging\log4j\log4j-api\2.13.3\log4j-api-2.13.3.jar;F:\repo\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;F:\repo\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;F:\repo\org\springframework\spring-core\5.3.1\spring-core-5.3.1.jar;F:\repo\org\springframework\spring-jcl\5.3.1\spring-jcl-5.3.1.jar;F:\repo\org\yaml\snakeyaml\1.27\snakeyaml-1.27.jar;F:\repo\org\springframework\boot\spring-boot-starter-jdbc\2.4.0\spring-boot-starter-jdbc-2.4.0.jar;F:\repo\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;F:\repo\org\springframework\spring-jdbc\5.3.1\spring-jdbc-5.3.1.jar;F:\repo\org\springframework\spring-tx\5.3.1\spring-tx-5.3.1.jar;F:\repo\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.1.4\mybatis-spring-boot-autoconfigure-2.1.4.jar;F:\repo\org\mybatis\mybatis\3.5.6\mybatis-3.5.6.jar;F:\repo\org\mybatis\mybatis-spring\2.0.6\mybatis-spring-2.0.6.jar;F:\repo\com\github\pagehelper\pagehelper-spring-boot-starter\1.3.1\pagehelper-spring-boot-starter-1.3.1.jar;F:\repo\com\github\pagehelper\pagehelper-spring-boot-autoconfigure\1.3.1\pagehelper-spring-boot-autoconfigure-1.3.1.jar;F:\repo\com\github\pagehelper\pagehelper\5.2.1\pagehelper-5.2.1.jar;F:\repo\com\github\jsqlparser\jsqlparser\4.0\jsqlparser-4.0.jar;F:\repo\com\github\oshi\oshi-core\5.8.0\oshi-core-5.8.0.jar;F:\repo\net\java\dev\jna\jna\5.8.0\jna-5.8.0.jar;F:\repo\net\java\dev\jna\jna-platform\5.8.0\jna-platform-5.8.0.jar;F:\repo\io\springfox\springfox-boot-starter\3.0.0\springfox-boot-starter-3.0.0.jar;F:\repo\io\springfox\springfox-oas\3.0.0\springfox-oas-3.0.0.jar;F:\repo\io\swagger\core\v3\swagger-annotations\2.1.2\swagger-annotations-2.1.2.jar;F:\repo\io\swagger\core\v3\swagger-models\2.1.2\swagger-models-2.1.2.jar;F:\repo\io\springfox\springfox-spi\3.0.0\springfox-spi-3.0.0.jar;F:\repo\io\springfox\springfox-schema\3.0.0\springfox-schema-3.0.0.jar;F:\repo\io\springfox\springfox-core\3.0.0\springfox-core-3.0.0.jar;F:\repo\net\bytebuddy\byte-buddy\1.10.11\byte-buddy-1.10.11.jar;F:\repo\io\springfox\springfox-spring-web\3.0.0\springfox-spring-web-3.0.0.jar;F:\repo\io\github\classgraph\classgraph\4.8.83\classgraph-4.8.83.jar;F:\repo\io\springfox\springfox-spring-webmvc\3.0.0\springfox-spring-webmvc-3.0.0.jar;F:\repo\io\springfox\springfox-spring-webflux\3.0.0\springfox-spring-webflux-3.0.0.jar;F:\repo\io\springfox\springfox-swagger-common\3.0.0\springfox-swagger-common-3.0.0.jar;F:\repo\org\mapstruct\mapstruct\1.3.1.Final\mapstruct-1.3.1.Final.jar;F:\repo\io\springfox\springfox-data-rest\3.0.0\springfox-data-rest-3.0.0.jar;F:\repo\io\springfox\springfox-bean-validators\3.0.0\springfox-bean-validators-3.0.0.jar;F:\repo\io\springfox\springfox-swagger2\3.0.0\springfox-swagger2-3.0.0.jar;F:\repo\io\springfox\springfox-swagger-ui\3.0.0\springfox-swagger-ui-3.0.0.jar;F:\repo\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;F:\repo\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;F:\repo\org\springframework\spring-beans\5.2.0.RELEASE\spring-beans-5.2.0.RELEASE.jar;F:\repo\org\springframework\spring-context\5.2.0.RELEASE\spring-context-5.2.0.RELEASE.jar;F:\repo\org\springframework\plugin\spring-plugin-metadata\2.0.0.RELEASE\spring-plugin-metadata-2.0.0.RELEASE.jar;F:\repo\io\swagger\swagger-models\1.6.2\swagger-models-1.6.2.jar;F:\repo\com\fasterxml\jackson\core\jackson-annotations\2.11.1\jackson-annotations-2.11.1.jar;F:\repo\io\swagger\swagger-annotations\1.6.2\swagger-annotations-1.6.2.jar;F:\repo\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;F:\repo\commons-fileupload\commons-fileupload\1.4\commons-fileupload-1.4.jar;F:\repo\org\apache\poi\poi-ooxml\4.1.2\poi-ooxml-4.1.2.jar;F:\repo\org\apache\poi\poi\4.1.2\poi-4.1.2.jar;F:\repo\commons-codec\commons-codec\1.13\commons-codec-1.13.jar;F:\repo\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;F:\repo\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;F:\repo\com\zaxxer\SparseBitSet\1.2\SparseBitSet-1.2.jar;F:\repo\org\apache\poi\poi-ooxml-schemas\4.1.2\poi-ooxml-schemas-4.1.2.jar;F:\repo\org\apache\xmlbeans\xmlbeans\3.1.0\xmlbeans-3.1.0.jar;F:\repo\org\apache\commons\commons-compress\1.19\commons-compress-1.19.jar;F:\repo\com\github\virtuald\curvesapi\1.06\curvesapi-1.06.jar;F:\repo\org\apache\velocity\velocity\1.7\velocity-1.7.jar;F:\repo\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;F:\repo\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;F:\repo\com\alibaba\fastjson\1.2.76\fastjson-1.2.76.jar;F:\repo\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;F:\repo\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;F:\repo\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;F:\repo\com\github\penggle\kaptcha\2.3.2\kaptcha-2.3.2.jar;F:\repo\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;F:\repo\com\jhlabs\filters\2.0.235-1\filters-2.0.235-1.jar;F:\repo\org\apache\commons\commons-lang3\3.12.0\commons-lang3-3.12.0.jar;F:\repo\org\springframework\boot\spring-boot-starter-security\2.5.4\spring-boot-starter-security-2.5.4.jar;F:\repo\org\springframework\spring-aop\5.3.9\spring-aop-5.3.9.jar;F:\repo\org\springframework\security\spring-security-config\5.5.2\spring-security-config-5.5.2.jar;F:\repo\org\springframework\security\spring-security-core\5.5.2\spring-security-core-5.5.2.jar;F:\repo\org\springframework\security\spring-security-crypto\5.5.2\spring-security-crypto-5.5.2.jar;F:\repo\org\springframework\security\spring-security-web\5.5.2\spring-security-web-5.5.2.jar;F:\repo\org\springframework\spring-expression\5.3.9\spring-expression-5.3.9.jar;F:\repo\org\springframework\spring-web\5.3.9\spring-web-5.3.9.jar com.zkxt.RuoYiApplication 14:50:28.766 [main] DEBUG org.springframework.boot.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [file:/E:/java/jdk/jre/lib/charsets.jar, file:/E:/java/jdk/jre/lib/deploy.jar, file:/E:/java/jdk/jre/lib/ext/access-bridge-64.jar, file:/E:/java/jdk/jre/lib/ext/cldrdata.jar, file:/E:/java/jdk/jre/lib/ext/dnsns.jar, file:/E:/java/jdk/jre/lib/ext/jaccess.jar, file:/E:/java/jdk/jre/lib/ext/jfxrt.jar, file:/E:/java/jdk/jre/lib/ext/localedata.jar, file:/E:/java/jdk/jre/lib/ext/nashorn.jar, file:/E:/java/jdk/jre/lib/ext/sunec.jar, file:/E:/java/jdk/jre/lib/ext/sunjce_provider.jar, file:/E:/java/jdk/jre/lib/ext/sunmscapi.jar, file:/E:/java/jdk/jre/lib/ext/sunpkcs11.jar, file:/E:/java/jdk/jre/lib/ext/zipfs.jar, file:/E:/java/jdk/jre/lib/javaws.jar, file:/E:/java/jdk/jre/lib/jce.jar, file:/E:/java/jdk/jre/lib/jfr.jar, file:/E:/java/jdk/jre/lib/jfxswt.jar, file:/E:/java/jdk/jre/lib/jsse.jar, file:/E:/java/jdk/jre/lib/management-agent.jar, file:/E:/java/jdk/jre/lib/plugin.jar, file:/E:/java/jdk/jre/lib/resources.jar, file:/E:/java/jdk/jre/lib/rt.jar, file:/F:/project/java/resource-app/target/classes/, file:/F:/repo/com/alibaba/druid-spring-boot-starter/1.2.6/druid-spring-boot-starter-1.2.6.jar, file:/F:/repo/com/alibaba/druid/1.2.6/druid-1.2.6.jar, file:/F:/repo/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar, file:/F:/repo/org/springframework/boot/spring-boot-autoconfigure/1.5.12.RELEASE/spring-boot-autoconfigure-1.5.12.RELEASE.jar, file:/F:/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar, file:/F:/repo/eu/bitwalker/UserAgentUtils/1.21/UserAgentUtils-1.21.jar, file:/F:/repo/org/mybatis/spring/boot/mybatis-spring-boot-starter/2.1.4/mybatis-spring-boot-starter-2.1.4.jar, file:/F:/repo/org/springframework/boot/spring-boot-starter/2.4.0/spring-boot-starter-2.4.0.jar, file:/F:/repo/org/springframework/boot/spring-boot-starter-logging/2.4.0/spring-boot-starter-logging-2.4.0.jar, file:/F:/repo/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar, file:/F:/repo/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar, file:/F:/repo/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3.jar, file:/F:/repo/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3.jar, file:/F:/repo/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar, file:/F:/repo/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar, file:/F:/repo/org/springframework/spring-core/5.3.1/spring-core-5.3.1.jar, file:/F:/repo/org/springframework/spring-jcl/5.3.1/spring-jcl-5.3.1.jar, file:/F:/repo/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar, file:/F:/repo/org/springframework/boot/spring-boot-starter-jdbc/2.4.0/spring-boot-starter-jdbc-2.4.0.jar, file:/F:/repo/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.jar, file:/F:/repo/org/springframework/spring-jdbc/5.3.1/spring-jdbc-5.3.1.jar, file:/F:/repo/org/springframework/spring-tx/5.3.1/spring-tx-5.3.1.jar, file:/F:/repo/org/mybatis/spring/boot/mybatis-spring-boot-autoconfigure/2.1.4/mybatis-spring-boot-autoconfigure-2.1.4.jar, file:/F:/repo/org/mybatis/mybatis/3.5.6/mybatis-3.5.6.jar, file:/F:/repo/org/mybatis/mybatis-spring/2.0.6/mybatis-spring-2.0.6.jar, file:/F:/repo/com/github/pagehelper/pagehelper-spring-boot-starter/1.3.1/pagehelper-spring-boot-starter-1.3.1.jar, file:/F:/repo/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.3.1/pagehelper-spring-boot-autoconfigure-1.3.1.jar, file:/F:/repo/com/github/pagehelper/pagehelper/5.2.1/pagehelper-5.2.1.jar, file:/F:/repo/com/github/jsqlparser/jsqlparser/4.0/jsqlparser-4.0.jar, file:/F:/repo/com/github/oshi/oshi-core/5.8.0/oshi-core-5.8.0.jar, file:/F:/repo/net/java/dev/jna/jna/5.8.0/jna-5.8.0.jar, file:/F:/repo/net/java/dev/jna/jna-platform/5.8.0/jna-platform-5.8.0.jar, file:/F:/repo/io/springfox/springfox-boot-starter/3.0.0/springfox-boot-starter-3.0.0.jar, file:/F:/repo/io/springfox/springfox-oas/3.0.0/springfox-oas-3.0.0.jar, file:/F:/repo/io/swagger/core/v3/swagger-annotations/2.1.2/swagger-annotations-2.1.2.jar, file:/F:/repo/io/swagger/core/v3/swagger-models/2.1.2/swagger-models-2.1.2.jar, file:/F:/repo/io/springfox/springfox-spi/3.0.0/springfox-spi-3.0.0.jar, file:/F:/repo/io/springfox/springfox-schema/3.0.0/springfox-schema-3.0.0.jar, file:/F:/repo/io/springfox/springfox-core/3.0.0/springfox-core-3.0.0.jar, file:/F:/repo/net/bytebuddy/byte-buddy/1.10.11/byte-buddy-1.10.11.jar, file:/F:/repo/io/springfox/springfox-spring-web/3.0.0/springfox-spring-web-3.0.0.jar, file:/F:/repo/io/github/classgraph/classgraph/4.8.83/classgraph-4.8.83.jar, file:/F:/repo/io/springfox/springfox-spring-webmvc/3.0.0/springfox-spring-webmvc-3.0.0.jar, file:/F:/repo/io/springfox/springfox-spring-webflux/3.0.0/springfox-spring-webflux-3.0.0.jar, file:/F:/repo/io/springfox/springfox-swagger-common/3.0.0/springfox-swagger-common-3.0.0.jar, file:/F:/repo/org/mapstruct/mapstruct/1.3.1.Final/mapstruct-1.3.1.Final.jar, file:/F:/repo/io/springfox/springfox-data-rest/3.0.0/springfox-data-rest-3.0.0.jar, file:/F:/repo/io/springfox/springfox-bean-validators/3.0.0/springfox-bean-validators-3.0.0.jar, file:/F:/repo/io/springfox/springfox-swagger2/3.0.0/springfox-swagger2-3.0.0.jar, file:/F:/repo/io/springfox/springfox-swagger-ui/3.0.0/springfox-swagger-ui-3.0.0.jar, file:/F:/repo/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar, file:/F:/repo/org/springframework/plugin/spring-plugin-core/2.0.0.RELEASE/spring-plugin-core-2.0.0.RELEASE.jar, file:/F:/repo/org/springframework/spring-beans/5.2.0.RELEASE/spring-beans-5.2.0.RELEASE.jar, file:/F:/repo/org/springframework/spring-context/5.2.0.RELEASE/spring-context-5.2.0.RELEASE.jar, file:/F:/repo/org/springframework/plugin/spring-plugin-metadata/2.0.0.RELEASE/spring-plugin-metadata-2.0.0.RELEASE.jar, file:/F:/repo/io/swagger/swagger-models/1.6.2/swagger-models-1.6.2.jar, file:/F:/repo/com/fasterxml/jackson/core/jackson-annotations/2.11.1/jackson-annotations-2.11.1.jar, file:/F:/repo/io/swagger/swagger-annotations/1.6.2/swagger-annotations-1.6.2.jar, file:/F:/repo/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar, file:/F:/repo/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar, file:/F:/repo/org/apache/poi/poi-ooxml/4.1.2/poi-ooxml-4.1.2.jar, file:/F:/repo/org/apache/poi/poi/4.1.2/poi-4.1.2.jar, file:/F:/repo/commons-codec/commons-codec/1.13/commons-codec-1.13.jar, file:/F:/repo/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar, file:/F:/repo/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar, file:/F:/repo/com/zaxxer/SparseBitSet/1.2/SparseBitSet-1.2.jar, file:/F:/repo/org/apache/poi/poi-ooxml-schemas/4.1.2/poi-ooxml-schemas-4.1.2.jar, file:/F:/repo/org/apache/xmlbeans/xmlbeans/3.1.0/xmlbeans-3.1.0.jar, file:/F:/repo/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar, file:/F:/repo/com/github/virtuald/curvesapi/1.06/curvesapi-1.06.jar, file:/F:/repo/org/apache/velocity/velocity/1.7/velocity-1.7.jar, file:/F:/repo/commons-lang/commons-lang/2.4/commons-lang-2.4.jar, file:/F:/repo/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar, file:/F:/repo/com/alibaba/fastjson/1.2.76/fastjson-1.2.76.jar, file:/F:/repo/io/jsonwebtoken/jjwt/0.9.1/jjwt-0.9.1.jar, file:/F:/repo/com/fasterxml/jackson/core/jackson-databind/2.9.6/jackson-databind-2.9.6.jar, file:/F:/repo/com/fasterxml/jackson/core/jackson-core/2.9.6/jackson-core-2.9.6.jar, file:/F:/repo/com/github/penggle/kaptcha/2.3.2/kaptcha-2.3.2.jar, file:/F:/repo/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar, file:/F:/repo/com/jhlabs/filters/2.0.235-1/filters-2.0.235-1.jar, file:/F:/repo/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar, file:/F:/repo/org/springframework/boot/spring-boot-starter-security/2.5.4/spring-boot-starter-security-2.5.4.jar, file:/F:/repo/org/springframework/spring-aop/5.3.9/spring-aop-5.3.9.jar, file:/F:/repo/org/springframework/security/spring-security-config/5.5.2/spring-security-config-5.5.2.jar, file:/F:/repo/org/springframework/security/spring-security-core/5.5.2/spring-security-core-5.5.2.jar, file:/F:/repo/org/springframework/security/spring-security-crypto/5.5.2/spring-security-crypto-5.5.2.jar, file:/F:/repo/org/springframework/security/spring-security-web/5.5.2/spring-security-web-5.5.2.jar, file:/F:/repo/org/springframework/spring-expression/5.3.9/spring-expression-5.3.9.jar, file:/F:/repo/org/springframework/spring-web/5.3.9/spring-web-5.3.9.jar, file:/E:/idea/lib/idea_rt.jar] 14:50:28.771 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/YamlProcessor$StrictMapAppenderConstructor at org.springframework.boot.env.YamlPropertySourceLoader$Processor.createYaml(YamlPropertySourceLoader.java:86) at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:132) at org.springframework.boot.env.YamlPropertySourceLoader$Processor.process(YamlPropertySourceLoader.java:101) at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:58) at org.springframework.boot.env.PropertySourcesLoader.load(PropertySourcesLoader.java:128) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.doLoadIntoGroup(ConfigFileApplicationListener.java:490) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadIntoGroup(ConfigFileApplicationListener.java:473) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:465) at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:386) at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:225) at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:195) at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:182) at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:168) 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:74) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325) at org.springframework.boot.SpringApplication.run(SpringApplication.java:296) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.config.YamlProcessor$StrictMapAppenderConstructor at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 24 common frames omitted Process finished with exit code 1
解决:
1.检查配置文件是否符合规范
2.缺少依赖包
org.yaml.snakeyaml包