GatewayApp.java 739 B

12345678910111213141516171819202122232425
  1. package com.leanwo.gateway;
  2. import org.slf4j.Logger;
  3. import org.slf4j.LoggerFactory;
  4. import org.springframework.boot.SpringApplication;
  5. import org.springframework.boot.autoconfigure.SpringBootApplication;
  6. import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  7. import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
  8. @SpringBootApplication
  9. //@EnableDiscoveryClient//开启Eureka的客户端发现
  10. @EnableZuulProxy// 开启Zuul的网关功能
  11. public class GatewayApp {
  12. private static Logger logger = LoggerFactory.getLogger(GatewayApp.class);
  13. public static void main(String[] args) throws Exception {
  14. SpringApplication.run(GatewayApp.class, args);
  15. logger.info("网关服务器启动成功。");
  16. }
  17. }