猿问

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

首先ideidea,jdk1.8,springcloud版本finchleysr5按照网上教程成功编写启动了eurekaserver应用:按照网上教程编写client无法启动:
clientpom:
org.springframework.boot
spring-boot-starter-parent
2.0.4.RELEASE
UTF-8
UTF-8
1.8
Finchley.SR1
org.springframework.cloud
spring-cloud-starter-config
org.springframework.cloud
spring-cloud-starter-netflix-eureka
org.springframework.cloud
spring-cloud-starter-netflix-eureka-client
org.springframework.boot
spring-boot-starter-web
test
org.springframework.boot
spring-boot-starter-test
test
org.yaml
snakeyaml
org.springframework.cloud
spring-cloud-dependencies
${spring-cloud.version}
pom
import
org.springframework.boot
spring-boot-maven-plugin
serverbootstrap.yml(同时配置了相同内容的application.yml)
server:
port:9918
eureka:
instance:
hostname:localhost
client:
register-with-eureka:false
fetch-registry:false
service-url:
defaultZone:http://${eureka.instance.hostname}:${server.port}/eureka
clientbootstrap.yml(同时配置了相同内容的application.yml)
server:
port:9919
spring:
application:
name:my-client1
eureka:
client:
service-url:
defaultZone:http://localhost:9918/eureka
app
packageoh.ssej.client1;
importorg.springframework.boot.SpringApplication;
importorg.springframework.boot.autoconfigure.SpringBootApplication;
importorg.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
@EnableDiscoveryClient
publicclassClient1Application{
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.Client1Application
2018-09-1211:13:29.824INFO19044---[main]s.c.a.AnnotationConfigApplicationContext:Refreshingorg.springframework.context.annotation.AnnotationConfigApplicationContext@445b295b:startupdate[WedSep1211:13:29CST2018];rootofcontexthierarchy
2018-09-1211:13:30.195INFO19044---[main]f.a.AutowiredAnnotationBeanPostProcessor:JSR-330'javax.inject.Inject'annotationfoundandsupportedforautowiring
2018-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:8888
2018-09-1211:13:32.432INFO19044---[main]c.c.c.ConfigServicePropertySourceLocator:ConnectTimeoutExceptiononUrl-http://localhost:8888.Willbetryingthenexturlifavailable
2018-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:connect
2018-09-1211:13:32.435INFO19044---[main]oh.ssej.client1.Client1Application:Noactiveprofileset,fallingbacktodefaultprofiles:default
2018-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@445b295b
2018-09-1211:13:33.214INFO19044---[main]o.s.cloud.context.scope.GenericScope:BeanFactoryid=c354accd-2f29-3102-b188-06315ecdd2d5
2018-09-1211:13:33.241INFO19044---[main]f.a.AutowiredAnnotationBeanPostProcessor:JSR-330'javax.inject.Inject'annotationfoundandsupportedforautowiring
2018-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:RegisteringbeansforJMXexposureonstartup
2018-09-1211:13:35.373INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Beanwithname'configurationPropertiesRebinder'hasbeenautodetectedforJMXexposure
2018-09-1211:13:35.373INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Beanwithname'environmentManager'hasbeenautodetectedforJMXexposure
2018-09-1211:13:35.375INFO19044---[main]o.s.j.e.a.AnnotationMBeanExporter:Beanwithname'refreshScope'hasbeenautodetectedforJMXexposure
2018-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:Startingbeansinphase0
2018-09-1211:13:35.473INFO19044---[main]o.s.c.n.eureka.InstanceInfoFactory:Settinginitialinstancestatusas:STARTING
2018-09-1211:13:35.543INFO19044---[main]com.netflix.discovery.DiscoveryClient:InitializingEurekainregionus-east-1
2018-09-1211:13:36.382INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingJSONencodingcodecLegacyJacksonJson
2018-09-1211:13:36.382INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingJSONdecodingcodecLegacyJacksonJson
2018-09-1211:13:36.651INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingXMLencodingcodecXStreamXml
2018-09-1211:13:36.651INFO19044---[main]c.n.d.provider.DiscoveryJerseyProvider:UsingXMLdecodingcodecXStreamXml
2018-09-1211:13:36.963INFO19044---[main]c.n.d.s.r.aws.ConfigClusterResolver:Resolvingeurekaendpointsviaconfiguration
2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Disabledeltaproperty:false
2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Singlevipregistryrefreshproperty:null
2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Forcefullregistryfetch:false
2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Applicationisnull:false
2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:RegisteredApplicationssizeiszero:true
2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Applicationversionis-1:true
2018-09-1211:13:37.273INFO19044---[main]com.netflix.discovery.DiscoveryClient:Gettingallinstanceregistryinfofromtheeurekaserver
2018-09-1211:13:37.552INFO19044---[main]com.netflix.discovery.DiscoveryClient:Theresponsestatusis200
2018-09-1211:13:37.555INFO19044---[main]com.netflix.discovery.DiscoveryClient:Startingheartbeatexecutor:renewintervalis:30
2018-09-1211:13:37.558INFO19044---[main]c.n.discovery.InstanceInfoReplicator:InstanceInfoReplicatoronDemandupdateallowedrateperminis4
2018-09-1211:13:37.565INFO19044---[main]com.netflix.discovery.DiscoveryClient:DiscoveryClientinitializedattimestamp1536722017562withinitialinstancescount:0
2018-09-1211:13:37.571INFO19044---[main]o.s.c.n.e.s.EurekaServiceRegistry:Registeringapplicationmy-client1witheurekawithstatusUP
2018-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@445b295b
2018-09-1211:13:37.625INFO19044---[Thread-25]o.s.c.n.e.s.EurekaServiceRegistry:Unregisteringapplicationmy-client1witheurekawithstatusDOWN
2018-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:Stoppingbeansinphase0
2018-09-1211:13:37.640INFO19044---[Thread-25]o.s.j.e.a.AnnotationMBeanExporter:UnregisteringJMX-exposedbeansonshutdown
2018-09-1211:13:37.642INFO19044---[Thread-25]o.s.j.e.a.AnnotationMBeanExporter:UnregisteringJMX-exposedbeans
2018-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
浮云间
浏览 4504回答 2
2回答

慕容708150

是不是没有添加web模块的依赖,导致启动工程接着就退出试试添加web依赖org.springframework.bootspring-boot-starter-web

尚方宝剑之说

org.springframework.bootspring-boot-starter-webtest
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答