为了账号安全,请及时绑定邮箱和手机立即绑定

spring cloud eureka client项目无法启动,配置文件yml不生效

spring cloud eureka client项目无法启动,配置文件yml不生效

浮云间 2019-05-12 09:07:51
首先ideidea,jdk1.8,springcloud版本finchleysr5按照网上教程成功编写启动了eurekaserver应用:按照网上教程编写client无法启动:clientpom:org.springframework.bootspring-boot-starter-parent2.0.4.RELEASEUTF-8UTF-81.8Finchley.SR1org.springframework.cloudspring-cloud-starter-configorg.springframework.cloudspring-cloud-starter-netflix-eurekaorg.springframework.cloudspring-cloud-starter-netflix-eureka-clientorg.springframework.bootspring-boot-starter-webtestorg.springframework.bootspring-boot-starter-testtestorg.yamlsnakeyamlorg.springframework.cloudspring-cloud-dependencies${spring-cloud.version}pomimportorg.springframework.bootspring-boot-maven-pluginserverbootstrap.yml(同时配置了相同内容的application.yml)server:port:9918eureka:instance:hostname:localhostclient:register-with-eureka:falsefetch-registry:falseservice-url:defaultZone:http://${eureka.instance.hostname}:${server.port}/eurekaclientbootstrap.yml(同时配置了相同内容的application.yml)server:port:9919spring:application:name:my-client1eureka:client:service-url:defaultZone:http://localhost:9918/eurekaapppackageoh.ssej.client1;importorg.springframework.boot.SpringApplication;importorg.springframework.boot.autoconfigure.SpringBootApplication;importorg.springframework.cloud.client.discovery.EnableDiscoveryClient;@SpringBootApplication@EnableDiscoveryClientpublicclassClient1Application{publicstaticvoidmain(String[]args){SpringApplication.run(Client1Application.class,args);}}错误内容(依然请求了8888端口)"B:\ProgramFiles\Java\jdk1.8.0_172\bin\java"-XX:TieredStopAtLevel=1-noverify-Dspring.output.ansi.enabled=always-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=57349-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false-Dspring.liveBeansView.mbeanDomain-Dspring.application.admin.enabled=true"-javaagent:B:\ProgramFiles\JetBrains\IntelliJIDEA2017.2.1\lib\idea_rt.jar=57350:B:\ProgramFiles\JetBrains\IntelliJIDEA2017.2.1\bin"-Dfile.encoding=UTF-8-classpath"B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\charsets.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\deploy.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\access-bridge-64.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\cldrdata.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\dnsns.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\jaccess.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\jfxrt.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\localedata.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\nashorn.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunec.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunjce_provider.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunmscapi.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\sunpkcs11.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\ext\zipfs.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\javaws.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jce.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jfr.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jfxswt.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\jsse.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\management-agent.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\plugin.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\resources.jar;B:\ProgramFiles\Java\jdk1.8.0_172\jre\lib\rt.jar;B:\idea_workspace\client1\target\classes;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-starter-config\2.0.1.RELEASE\spring-cloud-starter-config-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-starter\2.0.1.RELEASE\spring-cloud-starter-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-context\2.0.1.RELEASE\spring-cloud-context-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\security\spring-security-crypto\5.0.7.RELEASE\spring-security-crypto-5.0.7.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-commons\2.0.1.RELEASE\spring-cloud-commons-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\security\spring-security-rsa\1.0.5.RELEASE\spring-security-rsa-1.0.5.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.56\bcpkix-jdk15on-1.56.jar;A:\Users\JessHo\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.56\bcprov-jdk15on-1.56.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-config-client\2.0.1.RELEASE\spring-cloud-config-client-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.0.4.RELEASE\spring-boot-autoconfigure-2.0.4.RELEASE.jar;A:\Users\JessHo\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;A:\Users\JessHo\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;A:\Users\JessHo\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-eureka-client\2.0.1.RELEASE\spring-cloud-starter-netflix-eureka-client-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-netflix-core\2.0.1.RELEASE\spring-cloud-netflix-core-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.0.4.RELEASE\spring-boot-starter-aop-2.0.4.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-netflix-eureka-client\2.0.1.RELEASE\spring-cloud-netflix-eureka-client-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\com\netflix\eureka\eureka-client\1.9.3\eureka-client-1.9.3.jar;A:\Users\JessHo\.m2\repository\org\codehaus\jettison\jettison\1.3.7\jettison-1.3.7.jar;A:\Users\JessHo\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;A:\Users\JessHo\.m2\repository\com\netflix\netflix-commons\netflix-eventbus\0.3.0\netflix-eventbus-0.3.0.jar;A:\Users\JessHo\.m2\repository\com\netflix\netflix-commons\netflix-infix\0.3.0\netflix-infix-0.3.0.jar;A:\Users\JessHo\.m2\repository\commons-jxpath\commons-jxpath\1.3\commons-jxpath-1.3.jar;A:\Users\JessHo\.m2\repository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;A:\Users\JessHo\.m2\repository\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;A:\Users\JessHo\.m2\repository\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;A:\Users\JessHo\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;A:\Users\JessHo\.m2\repository\com\google\code\gson\gson\2.8.5\gson-2.8.5.jar;A:\Users\JessHo\.m2\repository\org\apache\commons\commons-math\2.2\commons-math-2.2.jar;A:\Users\JessHo\.m2\repository\com\netflix\archaius\archaius-core\0.7.6\archaius-core-0.7.6.jar;A:\Users\JessHo\.m2\repository\com\google\guava\guava\16.0\guava-16.0.jar;A:\Users\JessHo\.m2\repository\javax\ws\rs\jsr311-api\1.1.1\jsr311-api-1.1.1.jar;A:\Users\JessHo\.m2\repository\com\netflix\servo\servo-core\0.12.21\servo-core-0.12.21.jar;A:\Users\JessHo\.m2\repository\com\sun\jersey\jersey-core\1.19.1\jersey-core-1.19.1.jar;A:\Users\JessHo\.m2\repository\com\sun\jersey\jersey-client\1.19.1\jersey-client-1.19.1.jar;A:\Users\JessHo\.m2\repository\com\sun\jersey\contribs\jersey-apache-client4\1.19.1\jersey-apache-client4-1.19.1.jar;A:\Users\JessHo\.m2\repository\org\apache\httpcomponents\httpclient\4.5.6\httpclient-4.5.6.jar;A:\Users\JessHo\.m2\repository\org\apache\httpcomponents\httpcore\4.4.10\httpcore-4.4.10.jar;A:\Users\JessHo\.m2\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;A:\Users\JessHo\.m2\repository\com\google\inject\guice\4.1.0\guice-4.1.0.jar;A:\Users\JessHo\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar;A:\Users\JessHo\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;A:\Users\JessHo\.m2\repository\com\github\vlsi\compactmap\compactmap\1.2.1\compactmap-1.2.1.jar;A:\Users\JessHo\.m2\repository\com\github\andrewoma\dexx\dexx-collections\0.2\dexx-collections-0.2.jar;A:\Users\JessHo\.m2\repository\com\netflix\eureka\eureka-core\1.9.3\eureka-core-1.9.3.jar;A:\Users\JessHo\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.4.1\woodstox-core-asl-4.4.1.jar;A:\Users\JessHo\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;A:\Users\JessHo\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.4\stax2-api-3.1.4.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-archaius\2.0.1.RELEASE\spring-cloud-starter-netflix-archaius-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-netflix-ribbon\2.0.1.RELEASE\spring-cloud-netflix-ribbon-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-netflix-archaius\2.0.1.RELEASE\spring-cloud-netflix-archaius-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\commons-configuration\commons-configuration\1.8\commons-configuration-1.8.jar;A:\Users\JessHo\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar;A:\Users\JessHo\.m2\repository\org\springframework\cloud\spring-cloud-starter-netflix-ribbon\2.0.1.RELEASE\spring-cloud-starter-netflix-ribbon-2.0.1.RELEASE.jar;A:\Users\JessHo\.m2\repository\com\netflix\ribbon\ribbon\2.2.5\ribbon-2.2.5.jar;A:\Users\JessHo\.m2\repository\com\netflix\ribbon\ribbon-transport\2.2.5\ribbon-transport-2.2.5.jar;A:\Users\JessHo\.m2\repository\io\reactivex\rxnetty-contexts\0.4.9\rxnetty-contexts-0.4.9.jar;A:\Users\JessHo\.m2\repository\io\reactivex\rxnetty-servo\0.4.9\rxnetty-servo-0.4.9.jar;A:\Users\JessHo\.m2\repository\com\netflix\hystrix\hystrix-core\1.5.12\hystrix-core-1.5.12.jar;A:\Users\JessHo\.m2\repository\org\hdrhistogram\HdrHistogram\2.1.9\HdrHistogram-2.1.9.jar;A:\Users\JessHo\.m2\repository\io\reactivex\rxnetty\0.4.9\rxnetty-0.4.9.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-codec-http\4.1.27.Final\netty-codec-http-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-codec\4.1.27.Final\netty-codec-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-transport-native-epoll\4.1.27.Final\netty-transport-native-epoll-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-common\4.1.27.Final\netty-common-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-buffer\4.1.27.Final\netty-buffer-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-transport-native-unix-common\4.1.27.Final\netty-transport-native-unix-common-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-transport\4.1.27.Final\netty-transport-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\io\netty\netty-resolver\4.1.27.Final\netty-resolver-4.1.27.Final.jar;A:\Users\JessHo\.m2\repository\com\netflix\ribbon\ribbon-core\2.2.5\ribbon-core-2.2.5.jar;A:\Users\JessHo\.m2\repository\com\netflix\ribbon\ribbon-httpclient\2.2.5\ribbon-httpclient-2.2.5.jar;A:\Users\JessHo\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;A:\Users\JessHo\.m2\repository\com\netflix\netflix-commons\netflix-commons-util\0.3.0\netflix-commons-util-0.3.0.jar;A:\Users\JessHo\.m2\repository\com\netflix\ribbon\ribbon-loadbalancer\2.2.5\ribbon-loadbalancer-2.2.5.jar;A:\Users\JessHo\.m2\repository\com\netflix\netflix-commons\netflix-statistics\0.1.1\netflix-statistics-0.1.1.jar;A:\Users\JessHo\.m2\repository\io\reactivex\rxjava\1.3.8\rxjava-1.3.8.jar;A:\Users\JessHo\.m2\repository\com\netflix\ribbon\ribbon-eureka\2.2.5\ribbon-eureka-2.2.5.jar;A:\Users\JessHo\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;A:\Users\JessHo\.m2\repository\com\thoughtworks\xstream\xstream\1.4.10\xstream-1.4.10.jar;A:\Users\JessHo\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;A:\Users\JessHo\.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;A:\Users\JessHo\.m2\repository\org\springframework\boot\spring-boot-starter\2.0.4.RELEASE\spring-boot-starter-2.0.4.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\boot\spring-boot\2.0.4.RELEASE\spring-boot-2.0.4.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.0.4.RELEASE\spring-boot-starter-logging-2.0.4.RELEASE.jar;A:\Users\JessHo\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;A:\Users\JessHo\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;A:\Users\JessHo\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;A:\Users\JessHo\.m2\repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;A:\Users\JessHo\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;A:\Users\JessHo\.m2\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;A:\Users\JessHo\.m2\repository\org\springframework\spring-web\5.0.8.RELEASE\spring-web-5.0.8.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\spring-beans\5.0.8.RELEASE\spring-beans-5.0.8.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\spring-aop\5.0.8.RELEASE\spring-aop-5.0.8.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\spring-context\5.0.8.RELEASE\spring-context-5.0.8.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\spring-expression\5.0.8.RELEASE\spring-expression-5.0.8.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\spring-core\5.0.8.RELEASE\spring-core-5.0.8.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\springframework\spring-jcl\5.0.8.RELEASE\spring-jcl-5.0.8.RELEASE.jar;A:\Users\JessHo\.m2\repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar"oh.ssej.client1.Client1Application2018-09-1211:13:29.824INFO19044---[main]s.c.a.AnnotationConfigApplicationContext:Refreshingorg.springframework.context.annotation.AnnotationConfigApplicationContext@445b295b:startupdate[WedSep1211:13:29CST2018];rootofcontexthierarchy2018-09-1211:13:30.195INFO19044---[main]f.a.AutowiredAnnotationBeanPostProcessor:JSR-330'javax.inject.Inject'annotationfoundandsupportedforautowiring2018-09-1211:13:30.251INFO19044---[main]trationDelegate$BeanPostProcessorChecker:Bean'configurationPropertiesRebinderAutoConfiguration'oftype[org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f3f6c3e5]isnoteligibleforgettingprocessedbyallBeanPostProcessors(forexample:noteligibleforauto-proxying)._________/\\/___'_____(_)______\\\\(()\___|'_|'_||'_\/_`|\\\\\\/___)||_)|||||||(_||))))'|____|.__|_||_|_||_\__,|////=========|_|==============|___/=/_/_/_/::SpringBoot::(v2.0.4.RELEASE)2018-09-1211:13:31.044INFO19044---[main]c.c.c.ConfigServicePropertySourceLocator:Fetchingconfigfromserverat:http://localhost:88882018-09-1211:13:32.432INFO19044---[main]c.c.c.ConfigServicePropertySourceLocator:ConnectTimeoutExceptiononUrl-http://localhost:8888.Willbetryingthenexturlifavailable2018-09-1211:13:32.433WARN19044---[main]c.c.c.ConfigServicePropertySourceLocator:CouldnotlocatePropertySource:I/OerroronGETrequestfor"http://localhost:8888/my-client1/default":Connectionrefused:connect;nestedexceptionisjava.net.ConnectException:Connectionrefused:connect2018-09-1211:13:32.435INFO19044---[main]oh.ssej.client1.Client1Application:Noactiveprofileset,fallingbacktodefaultprofiles:default2018-09-1211:13:32.454INFO19044---[main]s.c.a.AnnotationConfigApplicationContext:Refreshingorg.springframework.context.annotation.AnnotationConfigApplicationContext@413f69cc:startupdate[WedSep1211:13:32CST2018];parent:org.springframework.context.annotation.AnnotationConfigApplicationContext@445b295b2018-09-1211:13:33.214INFO19044---[main]o.s.cloud.context.scope.GenericScope:BeanFactoryid=c354accd-2f29-3102-b188-06315ecdd2d52018-09-1211:13:33.241INFO19044---[main]f.a.AutowiredAnnotationBeanPostProcessor:JSR-330'javax.inject.Inject'annotationfoundandsupportedforautowiring2018-09-1211:13:33.338INFO19044---[main]trationDelegate$BeanPostProcessorChecker:Bean'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration'oftype[org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f3f6c3e5]isnoteligibleforgettingprocessedbyallBeanPostProcessors(forexample:noteligibleforauto-proxying)2018-09-1211:13:33.411WARN19044---[main]c.n.c.sources.URLConfigurationSource:NoURLswillbepolledasdynamicconfigurationsources.2018-09-1211:13:33.411INFO19044---[main]c.n.c.sources.URLConfigurationSource:ToenableURLsasdynamicconfigurationsources,defineSystempropertyarchaius.configurationSource.additionalUrlsormakeconfig.propertiesavailableonclasspath.2018-09-1211:13:33.418WARN19044---[main]c.n.c.sources.URLConfigurationSource:NoURLswillbepolledasdynamicconfigurationsources.2018-09-1211:13:33.418INFO19044---[main]c.n.c.sources.URLConfigurationSource:ToenableURLsasdynamicconfigurationsources,defineSystempropertyarchaius.configurationSource.additionalUrlsormakeconfig.propertiesavailableonclasspath.2018-09-1211:13:35.358INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:RegisteringbeansforJMXexposureonstartup2018-09-1211:13:35.373INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Beanwithname'configurationPropertiesRebinder'hasbeenautodetectedforJMXexposure2018-09-1211:13:35.373INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Beanwithname'environmentManager'hasbeenautodetectedforJMXexposure2018-09-1211:13:35.375INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Beanwithname'refreshScope'hasbeenautodetectedforJMXexposure2018-09-1211:13:35.380INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Locatedmanagedbean'environmentManager':registeringwithJMXserverasMBean[org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]2018-09-1211:13:35.407INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Locatedmanagedbean'refreshScope':registeringwithJMXserverasMBean[org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]2018-09-1211:13:35.431INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Locatedmanagedbean'configurationPropertiesRebinder':registeringwithJMXserverasMBean[org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=413f69cc,type=ConfigurationPropertiesRebinder]2018-09-1211:13:35.447INFO19044---[main]o.s.c.support.DefaultLifecycleProcessor:Startingbeansinphase02018-09-1211:13:35.473INFO19044---[main]o.s.c.n.eureka.InstanceInfoFactory:Settinginitialinstancestatusas:STARTING2018-09-1211:13:35.543INFO19044---[main]com.netflix.discovery.DiscoveryClient:InitializingEurekainregionus-east-12018-09-1211:13:36.382INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingJSONencodingcodecLegacyJacksonJson2018-09-1211:13:36.382INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingJSONdecodingcodecLegacyJacksonJson2018-09-1211:13:36.651INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingXMLencodingcodecXStreamXml2018-09-1211:13:36.651INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingXMLdecodingcodecXStreamXml2018-09-1211:13:36.963INFO19044---[main]c.n.d.s.r.aws.ConfigClusterResolver:Resolvingeurekaendpointsviaconfiguration2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Disabledeltaproperty:false2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Singlevipregistryrefreshproperty:null2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Forcefullregistryfetch:false2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Applicationisnull:false2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:RegisteredApplicationssizeiszero:true2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Applicationversionis-1:true2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Gettingallinstanceregistryinfofromtheeurekaserver2018-09-1211:13:37.552INFO19044---[main]com.netflix.discovery.DiscoveryClient:Theresponsestatusis2002018-09-1211:13:37.555INFO19044---[main]com.netflix.discovery.DiscoveryClient:Startingheartbeatexecutor:renewintervalis:302018-09-1211:13:37.558INFO19044---[main]c.n.discovery.InstanceInfoReplicator:InstanceInfoReplicatoronDemandupdateallowedrateperminis42018-09-1211:13:37.565INFO19044---[main]com.netflix.discovery.DiscoveryClient:DiscoveryClientinitializedattimestamp1536722017562withinitialinstancescount:02018-09-1211:13:37.571INFO19044---[main]o.s.c.n.e.s.EurekaServiceRegistry:Registeringapplicationmy-client1witheurekawithstatusUP2018-09-1211:13:37.572INFO19044---[main]com.netflix.discovery.DiscoveryClient:SawlocalstatuschangeeventStatusChangeEvent[timestamp=1536722017572,current=UP,previous=STARTING]2018-09-1211:13:37.575INFO19044---[nfoReplicator-0]com.netflix.discovery.DiscoveryClient:DiscoveryClient_MY-CLIENT1/NBRMTHEYL:my-client1:9919:registeringservice...2018-09-1211:13:37.598INFO19044---[main]oh.ssej.client1.Client1Application:StartedClient1Applicationin9.869seconds(JVMrunningfor12.992)2018-09-1211:13:37.621INFO19044---[Thread-25]s.c.a.AnnotationConfigApplicationContext:Closingorg.springframework.context.annotation.AnnotationConfigApplicationContext@413f69cc:startupdate[WedSep1211:13:32CST2018];parent:org.springframework.context.annotation.AnnotationConfigApplicationContext@445b295b2018-09-1211:13:37.625INFO19044---[Thread-25]o.s.c.n.e.s.EurekaServiceRegistry:Unregisteringapplicationmy-client1witheurekawithstatusDOWN2018-09-1211:13:37.626WARN19044---[Thread-25]com.netflix.discovery.DiscoveryClient:SawlocalstatuschangeeventStatusChangeEvent[timestamp=1536722017626,current=DOWN,previous=UP]2018-09-1211:13:37.629INFO19044---[Thread-25]o.s.c.support.DefaultLifecycleProcessor:Stoppingbeansinphase02018-09-1211:13:37.640INFO19044---[Thread-25]o.s.j.e.a.AnnotationMBeanExporter:UnregisteringJMX-exposedbeansonshutdown2018-09-1211:13:37.642INFO19044---[Thread-25]o.s.j.e.a.AnnotationMBeanExporter:UnregisteringJMX-exposedbeans2018-09-1211:13:37.649INFO19044---[Thread-25]com.netflix.discovery.DiscoveryClient:ShuttingdownDiscoveryClient...2018-09-1211:13:37.652WARN19044---[Thread-25].s.c.a.CommonAnnotationBeanPostProcessor:Invocationofdestroymethodfailedonbeanwithname'scopedTarget.eurekaClient':org.springframework.beans.factory.BeanCreationNotAllowedException:Errorcreatingbeanwithname'eurekaInstanceConfigBean':Singletonbeancreationnotallowedwhilesingletonsofthisfactoryareindestruction(DonotrequestabeanfromaBeanFactoryinadestroymethodimplementation!)Processfinishedwithexitcode0
查看完整描述

2 回答

?
慕容708150

TA贡献1831条经验 获得超4个赞

是不是没有添加web模块的依赖,导致启动工程接着就退出试试添加web依赖
org.springframework.boot
spring-boot-starter-web
                            
查看完整回答
反对 回复 2019-05-12
?
尚方宝剑之说

TA贡献1788条经验 获得超4个赞

org.springframework.boot
spring-boot-starter-web
test
                            
查看完整回答
反对 回复 2019-05-12
  • 2 回答
  • 0 关注
  • 4503 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信