SpringCloud客户端Client启动时自动停止

报错:
2018-05-30 18:07:35.436 INFO 7912 — [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@20ce78ec: startup date [Wed May 30 18:07:35 CST 2018]; root of context hierarchy
2018-05-30 18:07:35.652 INFO 7912 — [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 ‘javax.inject.Inject’ annotation found and supported for autowiring
2018-05-30 18:07:35.699 INFO 7912 — [ main] trationDelegate$BeanPostProcessorChecker : Bean ‘configurationPropertiesRebinderAutoConfiguration’ of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration
EnhancerBySpringCGLIB
a1cf77d7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

. _ _ _
/\ / _ ()_ _ _ _ \ \ \ \
( ( )___ | ‘_ | ‘| | ‘ \/ _` | \ \ \ \
\/ _)| |)| | | | | || (| | ) ) ) )
’ |_| .|| ||| |_, | / / / /
=========||==============|__/=///_/
:: Spring Boot :: (v2.0.2.RELEASE)

2018-05-30 18:07:36.603 INFO 7912 — [ main] com.zsl.client.ClientApplication : No active profile set, falling back to default profiles: default
2018-05-30 18:07:36.616 INFO 7912 — [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@198d6542: startup date [Wed May 30 18:07:36 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@20ce78ec
2018-05-30 18:07:36.977 INFO 7912 — [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=c0d788a6-3698-3a44-a78c-18f4704863ee

2018-05-30 18:07:37.155 WARN 7912 — [ main] o.s.c.n.a.ArchaiusAutoConfiguration : No spring.application.name found, defaulting to ‘application’
2018-05-30 18:07:37.157 WARN 7912 — [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2018-05-30 18:07:39.932 INFO 7912 — [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_UNKNOWN/OnePiece: registering service…
2018-05-30 18:07:39.948 INFO 7912 — [ main] com.zsl.client.ClientApplication : Started ClientApplication in 6.129 seconds (JVM running for 7.74)
2018-05-30 18:07:39.952 INFO 7912 — [ Thread-18] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@198d6542: startup date [Wed May 30 18:07:36 CST 2018]; parent:

Process finished with exit code 0

解决方法:
pom.xml中加入

<dependency>  
   <groupId>org.springframework.boot</groupId>  
   <artifactId>spring-boot-starter-web</artifactId>  
</dependency>  

即可

猜你喜欢

转载自blog.csdn.net/true1cc/article/details/81004306