Zuul 是在云平台上提供动态路由,监控,弹性,安全等边缘服务的框架。Zuul 相当于是设备和 Netflix 流应用的 Web 网站后端所有请求的前门。

ApiGateway服务器

1、pom

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

2、配置文件

  无相关配置

3、类

@SpringBootApplication
@EnableDiscoveryClient
@RestController
@EnableZuulProxy
public class GatewayApplication {
    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
    }
    @Bean
    public Filter shallowEtagHeaderFilter() {
        return new ShallowEtagHeaderFilter();
    }
}

@EnableZuulProxy

相关文章:

  • 2021-09-21
  • 2021-06-17
  • 2022-01-28
  • 2022-12-23
  • 2022-01-06
  • 2021-07-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-06-07
  • 2021-07-22
  • 2022-02-04
  • 2021-05-23
相关资源
相似解决方案