1.问题
服务没有注册到nacos
2. 原因
看一下是否导入了spring-boot-starter-web依赖,由于spring cloud是基于springboot的,所以此依赖必须要有
3. 解决方案
在pom.xml加入maven依赖
<!-- SpringBoot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>