package com.yiidata.dataops.server.config; import com.yiidata.dataops.server.modules.gateway.entity.OpsGatewayServer; import com.yiidata.dataops.server.modules.gateway.service.OpsGatewayServerService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.cloud.netflix.zuul.filters.SimpleRouteLocator; import org.springframework.cloud.netflix.zuul.filters.ZuulProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; /** *
* * Created by zhenqin. * User: zhenqin * Date: 2022/4/25 * Time: 下午7:08 * Vendor: yiidata.com * ** * @author zhenqin */ @Slf4j @Configuration public class ApiGatewayConfig implements InitializingBean { @Autowired OpsGatewayServerService opsGatewayServerService; @Autowired ServerProperties serverProperties; @Autowired ZuulProperties zuulProperties; @Override public void afterPropertiesSet() throws Exception { final List