报错信息:
2018-06-28 23:39:09.097 INFO 8068 --- [ Thread-5] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0
2018-06-28 23:39:09.099 INFO 8068 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
2018-06-28 23:39:09.439 INFO 8068 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_ORDER/PC-20180407WVNC:order - registration status: 204
2018-06-28 23:39:09.440 INFO 8068 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_ORDER/PC-20180407WVNC:order: registering service...
2018-06-28 23:39:09.455 INFO 8068 --- [nfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_ORDER/PC-20180407WVNC:order - registration status: 204
2018-06-28 23:39:09.456 INFO 8068 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : Unregistering ...
2018-06-28 23:39:09.486 INFO 8068 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : DiscoveryClient_ORDER/PC-20180407WVNC:order - deregister status: 200
2018-06-28 23:39:09.500 INFO 8068 --- [ Thread-5] com.netflix.discovery.DiscoveryClient : Completed shut down of DiscoveryClient
2018-06-28 23:39:09.501 INFO 8068 --- [ Thread-5] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2018-06-28 23:39:09.501 INFO 8068 --- [ Thread-5] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans
原因为:SpringBoot内置Tomcat没有正常启动
解决办法:
在<dependencies>中添加
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
注:我的springBoot版本是2.0.3的,请选择自己合适的版本