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
原因是缺少web集成包,解决方法:
在 pom.xml中加入
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
问题即可解决