package com.leanwo.gateway; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; @SpringBootApplication //@EnableDiscoveryClient//开启Eureka的客户端发现 @EnableZuulProxy// 开启Zuul的网关功能 public class GatewayApp { private static Logger logger = LoggerFactory.getLogger(GatewayApp.class); public static void main(String[] args) throws Exception { SpringApplication.run(GatewayApp.class, args); logger.info("网关服务器启动成功。"); } }