请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

在启动修改order为通过config获取配置时出现错误

老师你好,我在跟着视频进行到4:41秒时启动order项目出现错误。报错内容日志在下方,希望您能够帮忙解答一下,谢谢。我做了以下操作
1.配置好conf,在访问http://localhost:8080/order-dev.yml 能够正常查看到配置。
图片描述

2.在order项目中修改application.ymlbootstrap.yml,并且按照视频那样进行配置
图片描述
2.1 eureka中显示的服务吗也是CONFIG
图片描述

3.启动order项目(order项目的端口是8081)发现错误

"C:\Program Files\Java\jdk1.8.0_121\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:13551,suspend=y,server=n -Dserver.port=8081 -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\Administrator\.IntelliJIdea2019.2\system\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_121\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\rt.jar;G:\Project\IdeaProject\order-5-9\server\target\classes;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-eureka-client\2.0.0.M2\spring-cloud-starter-netflix-eureka-client-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.0.0.M3\spring-boot-starter-web-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.0.0.M3\spring-boot-starter-json-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.0.pr4\jackson-datatype-jdk8-2.9.0.pr4.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.0.pr4\jackson-datatype-jsr310-2.9.0.pr4.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.0.pr4\jackson-module-parameter-names-2.9.0.pr4.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\module\jackson-module-kotlin\2.9.0.pr4\jackson-module-kotlin-2.9.0.pr4.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.0.M3\spring-boot-starter-tomcat-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.16\tomcat-embed-core-8.5.16.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.16\tomcat-embed-el-8.5.16.jar;C:\Users\Administrator\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.16\tomcat-embed-websocket-8.5.16.jar;C:\Users\Administrator\.m2\repository\org\hibernate\hibernate-validator\5.4.1.Final\hibernate-validator-5.4.1.Final.jar;C:\Users\Administrator\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-webmvc\5.0.0.RC3\spring-webmvc-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-expression\5.0.0.RC3\spring-expression-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-starter\2.0.0.M2\spring-cloud-starter-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\org\springframework\security\spring-security-rsa\1.0.5.RELEASE\spring-security-rsa-1.0.5.RELEASE.jar;C:\Users\Administrator\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.56\bcpkix-jdk15on-1.56.jar;C:\Users\Administrator\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.56\bcprov-jdk15on-1.56.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-netflix-core\2.0.0.M2\spring-cloud-netflix-core-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot\2.0.0.M3\spring-boot-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\2.0.0.M2\spring-cloud-netflix-eureka-client-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\com\netflix\eureka\eureka-client\1.7.0\eureka-client-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\codehaus\jettison\jettison\1.3.7\jettison-1.3.7.jar;C:\Users\Administrator\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\Administrator\.m2\repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;C:\Users\Administrator\.m2\repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;C:\Users\Administrator\.m2\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;C:\Users\Administrator\.m2\repository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;C:\Users\Administrator\.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;C:\Users\Administrator\.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;C:\Users\Administrator\.m2\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;C:\Users\Administrator\.m2\repository\com\netflix\archaius\archaius-core\0.7.5\archaius-core-0.7.5.jar;C:\Users\Administrator\.m2\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;C:\Users\Administrator\.m2\repository\com\netflix\servo\servo-core\0.10.1\servo-core-0.10.1.jar;C:\Users\Administrator\.m2\repository\com\netflix\servo\servo-internal\0.10.1\servo-internal-0.10.1.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;C:\Users\Administrator\.m2\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpclient\4.5.3\httpclient-4.5.3.jar;C:\Users\Administrator\.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\Administrator\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\Administrator\.m2\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;C:\Users\Administrator\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\Users\Administrator\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.0.pr4\jackson-core-2.9.0.pr4.jar;C:\Users\Administrator\.m2\repository\com\netflix\eureka\eureka-core\1.7.0\eureka-core-1.7.0.jar;C:\Users\Administrator\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.4.1\woodstox-core-asl-4.4.1.jar;C:\Users\Administrator\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\Administrator\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-archaius\2.0.0.M2\spring-cloud-starter-netflix-archaius-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;C:\Users\Administrator\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;C:\Users\Administrator\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\Administrator\.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\2.0.0.M2\spring-cloud-starter-netflix-ribbon-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\com\netflix\ribbon\ribbon\2.2.2\ribbon-2.2.2.jar;C:\Users\Administrator\.m2\repository\com\netflix\ribbon\ribbon-transport\2.2.2\ribbon-transport-2.2.2.jar;C:\Users\Administrator\.m2\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;C:\Users\Administrator\.m2\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;C:\Users\Administrator\.m2\repository\com\netflix\hystrix\hystrix-core\1.5.12\hystrix-core-1.5.12.jar;C:\Users\Administrator\.m2\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;C:\Users\Administrator\.m2\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-codec-http\4.1.13.Final\netty-codec-http-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-codec\4.1.13.Final\netty-codec-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-transport-native-epoll\4.1.13.Final\netty-transport-native-epoll-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-common\4.1.13.Final\netty-common-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-buffer\4.1.13.Final\netty-buffer-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-transport-native-unix-common\4.1.13.Final\netty-transport-native-unix-common-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-transport\4.1.13.Final\netty-transport-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\io\netty\netty-resolver\4.1.13.Final\netty-resolver-4.1.13.Final.jar;C:\Users\Administrator\.m2\repository\com\netflix\ribbon\ribbon-core\2.2.2\ribbon-core-2.2.2.jar;C:\Users\Administrator\.m2\repository\com\netflix\ribbon\ribbon-httpclient\2.2.2\ribbon-httpclient-2.2.2.jar;C:\Users\Administrator\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\Administrator\.m2\repository\com\netflix\netflix-commons\netflix-commons-util\0.1.1\netflix-commons-util-0.1.1.jar;C:\Users\Administrator\.m2\repository\com\netflix\ribbon\ribbon-loadbalancer\2.2.2\ribbon-loadbalancer-2.2.2.jar;C:\Users\Administrator\.m2\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;C:\Users\Administrator\.m2\repository\io\reactivex\rxjava\1.3.0\rxjava-1.3.0.jar;C:\Users\Administrator\.m2\repository\com\netflix\ribbon\ribbon-eureka\2.2.2\ribbon-eureka-2.2.2.jar;C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\Administrator\.m2\repository\com\thoughtworks\xstream\xstream\1.4.9\xstream-1.4.9.jar;C:\Users\Administrator\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\Administrator\.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter\2.0.0.M3\spring-boot-starter-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.0.0.M3\spring-boot-starter-logging-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\Administrator\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\Administrator\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\Administrator\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;C:\Users\Administrator\.m2\repository\org\yaml\snakeyaml\1.18\snakeyaml-1.18.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-core\5.0.0.RC3\spring-core-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-jcl\5.0.0.RC3\spring-jcl-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.0.0.M3\spring-boot-starter-data-jpa-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.0.0.M3\spring-boot-starter-aop-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-aop\5.0.0.RC3\spring-aop-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\aspectj\aspectjweaver\1.8.10\aspectjweaver-1.8.10.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.0.0.M3\spring-boot-starter-jdbc-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\com\zaxxer\HikariCP\2.6.3\HikariCP-2.6.3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-jdbc\5.0.0.RC3\spring-jdbc-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\hibernate\hibernate-core\5.2.10.Final\hibernate-core-5.2.10.Final.jar;C:\Users\Administrator\.m2\repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;C:\Users\Administrator\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar;C:\Users\Administrator\.m2\repository\org\javassist\javassist\3.21.0-GA\javassist-3.21.0-GA.jar;C:\Users\Administrator\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\Administrator\.m2\repository\org\jboss\jandex\2.0.3.Final\jandex-2.0.3.Final.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\classmate\1.3.3\classmate-1.3.3.jar;C:\Users\Administrator\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\Administrator\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;C:\Users\Administrator\.m2\repository\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;C:\Users\Administrator\.m2\repository\org\springframework\data\spring-data-jpa\2.0.0.RC2\spring-data-jpa-2.0.0.RC2.jar;C:\Users\Administrator\.m2\repository\org\springframework\data\spring-data-commons\2.0.0.RC2\spring-data-commons-2.0.0.RC2.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-orm\5.0.0.RC3\spring-orm-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-context\5.0.0.RC3\spring-context-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-tx\5.0.0.RC3\spring-tx-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-beans\5.0.0.RC3\spring-beans-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-aspects\5.0.0.RC3\spring-aspects-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\mysql\mysql-connector-java\5.1.43\mysql-connector-java-5.1.43.jar;C:\Users\Administrator\.m2\repository\org\projectlombok\lombok\1.16.18\lombok-1.16.18.jar;C:\Users\Administrator\.m2\repository\com\google\code\gson\gson\2.8.1\gson-2.8.1.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-starter-feign\2.0.0.M2\spring-cloud-starter-feign-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-starter-openfeign\2.0.0.M3\spring-cloud-starter-openfeign-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\io\github\openfeign\feign-core\9.5.0\feign-core-9.5.0.jar;C:\Users\Administrator\.m2\repository\org\jvnet\animal-sniffer-annotation\1.0\animal-sniffer-annotation-1.0.jar;C:\Users\Administrator\.m2\repository\io\github\openfeign\feign-slf4j\9.5.0\feign-slf4j-9.5.0.jar;C:\Users\Administrator\.m2\repository\io\github\openfeign\feign-hystrix\9.5.0\feign-hystrix-9.5.0.jar;C:\Users\Administrator\.m2\repository\io\github\openfeign\feign-java8\9.5.1\feign-java8-9.5.1.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-config-client\2.0.0.M2\spring-cloud-config-client-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.0.0.M3\spring-boot-autoconfigure-2.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-commons\2.0.0.M2\spring-cloud-commons-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\org\springframework\security\spring-security-crypto\5.0.0.M3\spring-security-crypto-5.0.0.M3.jar;C:\Users\Administrator\.m2\repository\org\springframework\cloud\spring-cloud-context\2.0.0.M2\spring-cloud-context-2.0.0.M2.jar;C:\Users\Administrator\.m2\repository\org\springframework\spring-web\5.0.0.RC3\spring-web-5.0.0.RC3.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0.pr4\jackson-annotations-2.9.0.pr4.jar;C:\Users\Administrator\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.0.pr4\jackson-databind-2.9.0.pr4.jar;C:\Users\Administrator\.m2\repository\com\imooc\product-client\0.0.1-SNAPSHOT\product-client-0.0.1-SNAPSHOT.jar;C:\Users\Administrator\.m2\repository\com\imooc\product-common\0.0.1-SNAPSHOT\product-common-0.0.1-SNAPSHOT.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar" com.imooc.order.OrderApplication
Connected to the target VM, address: '127.0.0.1:13551', transport: 'socket'
2019-12-08 22:07:48.201  INFO 16660 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@7bb6ab3a: startup date [Sun Dec 08 22:07:48 CST 2019]; root of context hierarchy
2019-12-08 22:07:48.650  INFO 16660 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-12-08 22:07:48.705  INFO 16660 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$5d7b1854] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-12-08 22:07:50.533  INFO 16660 --- [           main] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname
2019-12-08 22:07:50.625  INFO 16660 --- [           main] o.s.c.n.eureka.InstanceInfoFactory       : Setting initial instance status as: STARTING
2019-12-08 22:07:50.702  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Initializing Eureka in region us-east-1
2019-12-08 22:07:51.245  INFO 16660 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2019-12-08 22:07:51.245  INFO 16660 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2019-12-08 22:07:51.344  INFO 16660 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2019-12-08 22:07:51.345  INFO 16660 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2019-12-08 22:07:51.626  INFO 16660 --- [           main] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2019-12-08 22:07:51.937  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Disable delta property : false
2019-12-08 22:07:51.938  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Single vip registry refresh property : null
2019-12-08 22:07:51.938  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Force full registry fetch : false
2019-12-08 22:07:51.938  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Application is null : false
2019-12-08 22:07:51.938  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Registered Applications size is zero : true
2019-12-08 22:07:51.938  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Application version is -1: true
2019-12-08 22:07:51.938  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Getting all instance registry info from the eureka server
2019-12-08 22:07:52.198  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : The response status is 200
2019-12-08 22:07:52.201  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Not registering with Eureka server per configuration
2019-12-08 22:07:52.206  INFO 16660 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1575814072206 with initial instances count: 2

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::             (v2.0.0.M3)

2019-12-08 22:07:54.042  INFO 16660 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8080/
2019-12-08 22:07:57.131  INFO 16660 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=order, profiles=[dev], label=null, version=c00377a212d9858c9a043a89e0e5903faef7a5ca, state=null
2019-12-08 22:07:57.132  INFO 16660 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource [name='configService', propertySources=[MapPropertySource [name='configClient'], MapPropertySource [name='https://git.imooc.com/CheungChingYin/config-repo.git/order-dev.yml'], MapPropertySource [name='https://git.imooc.com/CheungChingYin/config-repo.git/order.yml']]]
2019-12-08 22:07:57.151 ERROR 16660 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.util.LinkedHashMap<?, ?>] to type [java.lang.String]
	at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:319) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:173) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.env.AbstractPropertyResolver.convertValueIfNecessary(AbstractPropertyResolver.java:262) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:87) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.env.PropertySourcesPropertyResolver.getPropertyAsRawString(PropertySourcesPropertyResolver.java:71) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.env.AbstractPropertyResolver.lambda$doResolvePlaceholders$0(AbstractPropertyResolver.java:236) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:151) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.env.AbstractPropertyResolver.resolvePlaceholders(AbstractPropertyResolver.java:202) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.core.env.AbstractEnvironment.resolvePlaceholders(AbstractEnvironment.java:561) ~[spring-core-5.0.0.RC3.jar:5.0.0.RC3]
	at org.springframework.boot.context.ContextIdApplicationContextInitializer.getApplicationId(ContextIdApplicationContextInitializer.java:109) ~[spring-boot-2.0.0.M3.jar:2.0.0.M3]
	at org.springframework.boot.context.ContextIdApplicationContextInitializer.initialize(ContextIdApplicationContextInitializer.java:105) ~[spring-boot-2.0.0.M3.jar:2.0.0.M3]
	at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:624) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
	at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:364) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
	at com.imooc.order.OrderApplication.main(OrderApplication.java:14) [classes/:na]

Disconnected from the target VM, address: '127.0.0.1:13551', transport: 'socket'

Process finished with exit code 1

正在回答 回答被采纳积分+3

1回答

廖师兄 2019-12-09 11:40:39

eureka的地址要配置在boostrap.yml里

0 回复 有任何疑惑可以回复我~
  • 提问者 CheungChingYin #1
    老师你好,配置了eureka地址后依然出现问题,还是报上方提到的转换错误,配置是从git里面复制一份,只是地址端口改为8761而已,order项目是从5-9拉过来的,没有改配置之前能够正常运行
    
    bootstrap.yml配置如下
    
    ```
    spring:
      application:
        name: order
      cloud:
        config:
          discovery:
            enabled: true
            service-id: CONFIG
          profile: dev
    eureka:
      client:
        service-url:
          defaultZone: http://localhost:8761/eureka/
    ```
    回复 有任何疑惑可以回复我~ 2019-12-15 18:02:21
  • 廖师兄 回复 提问者 CheungChingYin #2
    你把你的代码push到github吧,我帮你看看。
    order、config、config-repo
    回复 有任何疑惑可以回复我~ 2019-12-16 16:53:06
  • 提问者 CheungChingYin 回复 廖师兄 #3
    下方为我的代码仓库,麻烦老师了。由于我白天要上班,可能不能及时回复,还请见谅。(由于不希望将这些demo放在github上,所以先用了慕课网的git,全部仓库已设置为公开,如果不能正常拉取我再放到GitHub上,另外由于config的配置会涉及到账户密码的问题,我以*来填充)
    
    config: https://git.imooc.com/CheungChingYin/config
    
    config-repo: https://git.imooc.com/CheungChingYin/config-repo
    
    order: https://git.imooc.com/CheungChingYin/order
    回复 有任何疑惑可以回复我~ 2019-12-16 23:50:01
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信