Commit f1247c1b authored by zhangzc's avatar zhangzc

123

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