启动Eureka-client客户端时,报错信息如下:
Started ClientApplication in
3.537 seconds
(JVM running
for 4.742)
2018-07-18 22:53:35.426 INFO
8960 --- [ Thread
-13] s
.c
.a
.AnnotationConfigApplicationContext
: Closing org
.springframework
.context
.annotation
.AnnotationConfigApplicationContext
@6cdba6dc: startup date
[Wed Jul
18 22:53:33 GMT
+08:00 2018]; parent
: org
.springframework
.context
.annotation
.AnnotationConfigApplicationContext
@3d51f06e
2018-07-18 22:53:35.426 INFO
8960 --- [ Thread
-13] o
.s
.c
.n
.e
.s
.EurekaServiceRegistry
: Unregistering application client with eureka with status DOWN
2018-07-18 22:53:35.427 WARN
8960 --- [ Thread
-13] com
.netflix
.discovery
.DiscoveryClient
: Saw local status change event StatusChangeEvent
[timestamp
=1531925615427, current
=DOWN
, previous
=UP
]
2018-07-18 22:53:35.428 INFO
8960 --- [ Thread
-13] o
.s
.c
.support
.DefaultLifecycleProcessor
: Stopping beans in phase
0
2018-07-18 22:53:35.429 INFO
8960 --- [ Thread
-13] com
.netflix
.discovery
.DiscoveryClient
: Shutting down DiscoveryClient
...
2018-07-18 22:53:35.445 INFO
8960 --- [nfoReplicator
-0] com
.netflix
.discovery
.DiscoveryClient
: DiscoveryClient_CLIENT
/XXXXXXX
:client
:8080 - registration status
: 204
2018-07-18 22:53:35.446 INFO
8960 --- [nfoReplicator
-0] com
.netflix
.discovery
.DiscoveryClient
: DiscoveryClient_CLIENT
/XXXXXXX
:client
:8080: registering service
...
2018-07-18 22:53:35.451 INFO
8960 --- [nfoReplicator
-0] com
.netflix
.discovery
.DiscoveryClient
: DiscoveryClient_CLIENT
/XXXXXXX
:client
:8080 - registration status
: 204
2018-07-18 22:53:35.452 INFO
8960 --- [ Thread
-13] com
.netflix
.discovery
.DiscoveryClient
: Unregistering
...
2018-07-18 22:53:35.461 INFO
8960 --- [ Thread
-13] com
.netflix
.discovery
.DiscoveryClient
: DiscoveryClient_CLIENT
/XXXXXXX
:client
:8080 - deregister status
: 200
2018-07-18 22:53:35.472 INFO
8960 --- [ Thread
-13] com
.netflix
.discovery
.DiscoveryClient
: Completed shut down of DiscoveryClient
2018-07-18 22:53:35.472 INFO
8960 --- [ Thread
-13] o
.s
.j
.e
.a
.AnnotationMBeanExporter
: Unregistering JMX
-exposed beans on shutdown
2018-07-18 22:53:35.473 INFO
8960 --- [ Thread
-13] o
.s
.j
.e
.a
.AnnotationMBeanExporter
: Unregistering JMX
-exposed beans
原因
没有Web支持
解决方案
添加web支持
<dependency>
<groupId>org.springframework.boot
</groupId>
<artifactId>spring-boot-starter-web
</artifactId>
</dependency>