Commit f1247c1b authored by zhangzc's avatar zhangzc

123

parent e1e4ab6a
Pipeline #557 failed with stages
......@@ -8,11 +8,11 @@
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
</parent>
<groupId>com.esv.datacenter</groupId>
<artifactId>datacenter-gateway-service</artifactId>
<groupId>com.esv.superhive</groupId>
<artifactId>superhive-gateway-service</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>datacenter-gateway-service</name>
<description>datacenter-gateway-service</description>
<name>superhive-gateway-service</name>
<description>superhive-gateway-service</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......@@ -145,7 +145,7 @@
</profiles>
<build>
<finalName>datacenter-gateway-service</finalName>
<finalName>superhive-gateway-service</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
......
package com.esv.datacenter.gateway;
package com.esv.superhive.gateway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
......@@ -21,7 +21,7 @@ import java.util.TimeZone;
@SpringBootApplication
@EnableDiscoveryClient
@EnableZuulProxy
@EnableFeignClients({"com.esv.datacenter.gateway.feign"})
@EnableFeignClients({"com.esv.superhive.gateway.feign"})
public class GatewayApplication {
public static void main(String[] args) {
......
package com.esv.datacenter.gateway.common.component;
package com.esv.superhive.gateway.common.component;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
......
package com.esv.datacenter.gateway.common.component;
package com.esv.superhive.gateway.common.component;
import com.alibaba.fastjson.JSONObject;
import com.esv.datacenter.gateway.util.LogUtils;
import com.esv.superhive.gateway.util.LogUtils;
import com.netflix.client.ClientException;
import com.netflix.hystrix.exception.HystrixTimeoutException;
import lombok.extern.slf4j.Slf4j;
......
package com.esv.datacenter.gateway.common.constants;
package com.esv.superhive.gateway.common.constants;
/**
* @description: 全局常量
......
package com.esv.datacenter.gateway.common.exception;
package com.esv.superhive.gateway.common.exception;
/**
* @description:
......
package com.esv.datacenter.gateway.common.response;
package com.esv.superhive.gateway.common.response;
/**
* @description:
......
package com.esv.datacenter.gateway.common.response;
package com.esv.superhive.gateway.common.response;
import com.esv.datacenter.gateway.util.LogUtils;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.esv.superhive.gateway.util.LogUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
......
package com.esv.datacenter.gateway.config;
package com.esv.superhive.gateway.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......
package com.esv.datacenter.gateway.config;
package com.esv.superhive.gateway.config;
import com.esv.datacenter.gateway.filter.AccessFilter;
import com.esv.datacenter.gateway.filter.AuthRoutingFilter;
import com.esv.datacenter.gateway.filter.LogBackPreFilter;
import com.esv.superhive.gateway.filter.AccessFilter;
import com.esv.superhive.gateway.filter.AuthRoutingFilter;
import com.esv.superhive.gateway.filter.LogBackPreFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......
package com.esv.datacenter.gateway.feign;
package com.esv.superhive.gateway.feign;
import com.esv.datacenter.gateway.common.response.EResponse;
import com.esv.superhive.gateway.common.response.EResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......
package com.esv.datacenter.gateway.feign;
package com.esv.superhive.gateway.feign;
import lombok.Data;
......
package com.esv.datacenter.gateway.feign;
package com.esv.superhive.gateway.feign;
import lombok.Data;
......
package com.esv.datacenter.gateway.filter;
package com.esv.superhive.gateway.filter;
import lombok.extern.slf4j.Slf4j;
......
package com.esv.datacenter.gateway.filter;
import com.esv.datacenter.gateway.common.response.EResponse;
import com.esv.datacenter.gateway.feign.AuthFeignClient;
import com.esv.datacenter.gateway.feign.WebReqAuthReq;
import com.esv.datacenter.gateway.feign.WebReqAuthRes;
import com.esv.datacenter.gateway.util.LogUtils;
import com.esv.datacenter.gateway.util.RequestUriUtils;
import com.esv.datacenter.gateway.util.ResponseUtils;
package com.esv.superhive.gateway.filter;
import com.esv.superhive.gateway.common.response.EResponse;
import com.esv.superhive.gateway.feign.AuthFeignClient;
import com.esv.superhive.gateway.feign.WebReqAuthReq;
import com.esv.superhive.gateway.feign.WebReqAuthRes;
import com.esv.superhive.gateway.util.LogUtils;
import com.esv.superhive.gateway.util.RequestUriUtils;
import com.esv.superhive.gateway.util.ResponseUtils;
import com.esv.gateway.common.GatewayHeaders;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
......
package com.esv.datacenter.gateway.filter;
package com.esv.superhive.gateway.filter;
import com.esv.datacenter.gateway.common.constants.CommonConstants;
import com.esv.superhive.gateway.common.constants.CommonConstants;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
......
package com.esv.datacenter.gateway.util;
package com.esv.superhive.gateway.util;
import com.esv.datacenter.gateway.common.constants.CommonConstants;
import com.esv.superhive.gateway.common.constants.CommonConstants;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.MDC;
......
package com.esv.datacenter.gateway.util;
package com.esv.superhive.gateway.util;
/**
* @description:
......
package com.esv.datacenter.gateway.util;
package com.esv.superhive.gateway.util;
import com.esv.datacenter.gateway.common.response.EResponse;
import com.esv.superhive.gateway.common.response.EResponse;
import com.netflix.zuul.context.RequestContext;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
......
......@@ -11,7 +11,11 @@ management:
app:
service:
cc:
name: datacenter-cc-service
name: superhive-cc-service
base:
name: superhive-base-service
iot:
name: superhive-iot-service
# 负载均衡设置
ribbon:
# http建立socket超时时间,毫秒
......@@ -45,5 +49,13 @@ zuul:
routes:
cc-service:
path: /cc/**
service-id: datacenter-cc-service
service-id: superhive-cc-service
stripPrefix: false
base-service:
path: /base/**
service-id: superhive-base-service
stripPrefix: false
iot-service:
path: /iot/**
service-id: superhive-iot-service
stripPrefix: false
\ No newline at end of file
......@@ -4,11 +4,11 @@ server:
context-path: /
nacos:
url: 192.168.31.248:8848
namespace: 1697ea67-be4c-4d38-b00d-39392b9dee8f
namespace: a068bd25-15f8-4752-8774-08017416270d
group: DEFAULT_GROUP
spring:
application:
name: datacenter-gateway-service
name: superhive-gateway-service
profiles:
active: local
cloud:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment