Param ‘serviceName‘ is illegal, serviceName is blank

Param ‘serviceName’ is illegal, serviceName is blank:是因为配置文件必须叫application.yml,
不能叫其他名字:我刚开始叫application-nacos.yml,启动失败,
如果不是这个问题,你就需要检测自己的配置文件的空格层级有没有写错了
下面是nacos集成gateway

server:
  port:  8088
spring:
  application:
    name: api-gateway
  cloud:
    # 配置gateway
    # 路由规则
    gateway:
      discovery:
        locator:
          enabled: true #是否启动自动识别nacos服务
    nacos:
      discovery:
        server-addr:  192.168.56.130:8847
        username: nacos
        password: nacos



你可能感兴趣的:(微服务,java)