【SpringBoot系列】Spring cloud Gateway 动态路由到底有多简单
Spring Cloud Gateway 动态路由可以通过自定义RouteDefinitionRepository实现。以下是一个简单的例子:
- 创建一个自定义的RouteDefinitionRepository:
@Component
public class DynamicRouteService implements RouteDefinitionRepository {
private final RouteDefinitionWriter routeDefinitionWriter;
@Autowired
评论已关闭