gateway 微服务相关内容

yml部分文件

spring:
  cloud:
    gateway:
      routes: #路由
        - id: admin_route # 路由id
#          uri: http://127.0.0.1:8080/renren-fast #断言匹配的规则之后,要跳转的uri
          uri: lb://renren-fast
          predicates: #断言规则
            - Path=/api/**
          filters: #http://localhost:88/api/captcha.jpg
            - RewritePath=/api/?(?<segment>.*), /renren-fast/$\{segment}

此次问题根本原因是springcloud和springcloudAlibaba整合版本不一样导致的问题。
在这里插入图片描述
导致503的原因很多,大致都是没有依赖到具体的功能,或者是依赖冲突了

		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-loadbalancer</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-openfeign</artifactId>
		</dependency>

版权声明:本文为helloyuyuan原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/helloyuyuan/article/details/122994398