完成API网关功能

api-gateway-netflix-zuul
DerekYRC 2 years ago
parent e36e635db7
commit c42a145cd5

@ -1,43 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mini-spring-cloud</artifactId>
<groupId>com.github</groupId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mini-spring-cloud-api-gateway-example</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-netflix-zuul</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mini-spring-cloud</artifactId>
<groupId>com.github</groupId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mini-spring-cloud-api-gateway-example</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-netflix-zuul</artifactId>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-load-balancer</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
<version>0.7.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

@ -7,7 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author derek()
* @date 2022/6/26
* @date 2022/6/26
*/
@EnableZuulProxy
@SpringBootApplication

@ -1,3 +1,12 @@
spring:
application:
name: api-gateway-application
cloud:
tutu:
discovery:
server-addr: localhost:6688
service: ${spring.application.name}
server:
port: 8888

@ -1,70 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mini-spring-cloud</artifactId>
<groupId>com.github</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mini-spring-cloud</artifactId>
<groupId>com.github</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mini-spring-cloud-netflix-zuul</artifactId>
<artifactId>mini-spring-cloud-netflix-zuul</artifactId>
<dependencies>
<dependency>
<groupId>com.netflix.zuul</groupId>
<artifactId>zuul-core</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>com.netflix.zuul</groupId>
<artifactId>zuul-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
</project>

@ -9,8 +9,9 @@ import org.springframework.context.annotation.Import;
/**
* zuul
*
* @author derek()
* @date 2022/6/23
* @date 2022/6/23
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)

@ -24,8 +24,10 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* zuul API
*
* @author derek()
* @date 2022/6/23
* @date 2022/6/23
*/
@Configuration
@EnableConfigurationProperties({ZuulProperties.class})
@ -42,6 +44,9 @@ public class ZuulServerAutoConfiguration {
return new ServletRegistrationBean<>(new ZuulServlet(), zuulProperties.getServletPath());
}
/**
*
*/
@Bean
public RouteLocator simpleRouteLocator() {
return new SimpleRouteLocator(zuulProperties);
@ -71,6 +76,9 @@ public class ZuulServerAutoConfiguration {
return new SendResponseFilter();
}
/**
*
*/
@Bean
public FilterRegistry filterRegistry(Map<String, ZuulFilter> filterMap) {
FilterRegistry filterRegistry = FilterRegistry.instance();

@ -2,8 +2,9 @@ package com.github.cloud.netflix.zuul.filters;
/**
*
*
* @author derek()
* @date 2022/6/28
* @date 2022/6/28
*/
public class Route {
@ -16,7 +17,6 @@ public class Route {
this.location = location;
}
public String getPath() {
return path;
}

@ -2,13 +2,15 @@ package com.github.cloud.netflix.zuul.filters;
/**
*
*
* @author derek()
* @date 2022/6/28
* @date 2022/6/28
*/
public interface RouteLocator {
/**
*
*
* @param path
* @return
*/

@ -1,14 +1,15 @@
package com.github.cloud.netflix.zuul.filters;
import java.util.Map;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;
import java.util.Map;
/**
*
*
* @author derek()
* @date 2022/6/28
* @date 2022/6/28
*/
public class SimpleRouteLocator implements RouteLocator {
@ -26,10 +27,11 @@ public class SimpleRouteLocator implements RouteLocator {
ZuulProperties.ZuulRoute zuulRoute = entry.getValue();
String pattern = zuulRoute.getPath();
if (pathMatcher.match(pattern, path)) {
return new Route(path, zuulRoute.getServiceId());
String targetPath = path.substring(pattern.indexOf("*") - 1);
return new Route(targetPath, zuulRoute.getServiceId());
}
}
return null;
}
}
}

@ -7,7 +7,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* @author derek()
* @date 2022/6/23
* @date 2022/6/23
*/
@ConfigurationProperties("zuul")
public class ZuulProperties {

@ -1,22 +1,27 @@
package com.github.cloud.netflix.zuul.filters.post;
import java.io.OutputStream;
import javax.servlet.http.HttpServletResponse;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StreamUtils;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.io.OutputStream;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.POST_TYPE;
import static org.springframework.util.ReflectionUtils.rethrowRuntimeException;
/**
* post
*
* @author derek()
* @date 2022/6/27
* @date 2022/6/27
*/
public class SendResponseFilter extends ZuulFilter {
private static Logger logger = LoggerFactory.getLogger(SendResponseFilter.class);
@Override
public String filterType() {
@ -30,21 +35,35 @@ public class SendResponseFilter extends ZuulFilter {
@Override
public boolean shouldFilter() {
RequestContext requestContext = RequestContext.getCurrentContext();
return requestContext.getResponseDataStream() != null;
return RequestContext.getCurrentContext()
.getResponseDataStream() != null;
}
@Override
public Object run() throws ZuulException {
//向客户端输出响应报文
RequestContext requestContext = RequestContext.getCurrentContext();
HttpServletResponse servletResponse = requestContext.getResponse();
if (servletResponse.getCharacterEncoding() == null) {
InputStream inputStream = requestContext.getResponseDataStream();
try {
HttpServletResponse servletResponse = requestContext.getResponse();
servletResponse.setCharacterEncoding("UTF-8");
}
OutputStream outStream = servletResponse.getOutputStream();
OutputStream outStream = servletResponse.getOutputStream();
StreamUtils.copy(inputStream, outStream);
} catch (Exception e) {
rethrowRuntimeException(e);
} finally {
//关闭输入输出流
if (inputStream != null) {
try {
inputStream.close();
} catch (Exception e) {
logger.error("关闭输入流失败", e);
}
}
//Servlet容器会自动关闭输出流
}
return null;
}
}
}

@ -8,15 +8,13 @@ import com.netflix.zuul.exception.ZuulException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.PRE_TYPE;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.REQUEST_URI_KEY;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.SERVICE_ID_KEY;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.*;
/**
* preRouteLocator
*
* @author derek()
* @date 2022/6/27
* @date 2022/6/27
*/
public class PreDecorationFilter extends ZuulFilter {
private static Logger logger = LoggerFactory.getLogger(PreDecorationFilter.class);
@ -51,8 +49,7 @@ public class PreDecorationFilter extends ZuulFilter {
if (route != null) {
requestContext.put(REQUEST_URI_KEY, route.getPath());
requestContext.set(SERVICE_ID_KEY, route.getLocation());
}
else {
} else {
logger.error("获取不到匹配的路由, requestURI: {}", requestContext);
}

@ -1,31 +1,25 @@
package com.github.cloud.netflix.zuul.filters.route;
import java.io.IOException;
import java.io.InputStream;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import cn.hutool.http.Method;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.cloud.client.loadbalancer.LoadBalancerRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpResponse;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.REQUEST_URI_KEY;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.ROUTE_TYPE;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.SERVICE_ID_KEY;
import static com.github.cloud.netflix.zuul.filters.support.FilterConstants.*;
import static org.springframework.util.ReflectionUtils.rethrowRuntimeException;
/**
* route使ribbonhttp
*
* @author derek()
* @date 2022/6/27
* @date 2022/6/27
*/
public class RibbonRoutingFilter extends ZuulFilter {
private static Logger logger = LoggerFactory.getLogger(RibbonRoutingFilter.class);
@ -54,33 +48,30 @@ public class RibbonRoutingFilter extends ZuulFilter {
@Override
public Object run() throws ZuulException {
RequestContext requestContext = RequestContext.getCurrentContext();
String serviceId = (String) requestContext.get(SERVICE_ID_KEY);
String requestURI = (String) requestContext.get(REQUEST_URI_KEY);
HttpServletRequest request = requestContext.getRequest();
String method = request.getMethod();
ServletInputStream inputStream = null;
try {
inputStream = request.getInputStream();
}
catch (IOException e) {
logger.error("获取输入流失败", e);
RequestContext requestContext = RequestContext.getCurrentContext();
//使用ribbon的负载均衡能力发起远程调用
//TODO 简单实现,熔断降级章节再完善
String serviceId = (String) requestContext.get(SERVICE_ID_KEY);
ServiceInstance serviceInstance = loadBalancerClient.choose(serviceId);
if (serviceInstance == null) {
logger.error("根据serviceId查询不到服务示例serviceId: {}", serviceId);
return null;
}
String requestURI = (String) requestContext.get(REQUEST_URI_KEY);
String url = serviceInstance.getUri().toString() + requestURI;
HttpRequest httpRequest = HttpUtil.createRequest(Method.POST, url);
HttpResponse httpResponse = httpRequest.execute();
//将响应报文的状态码和内容写进请求上下文中
requestContext.setResponseStatusCode(httpResponse.getStatus());
requestContext.setResponseDataStream(httpResponse.bodyStream());
return httpResponse;
} catch (Exception e) {
rethrowRuntimeException(e);
}
//TODO 构造请求
LoadBalancerRequest<ClientHttpResponse> loadBalancerRequest = null;
ClientHttpResponse response = loadBalancerClient.execute(serviceId, loadBalancerRequest);
int statusCode = response.getRawStatusCode();
InputStream responseBody = response.getBody();
requestContext.setResponseStatusCode(statusCode);
requestContext.setResponseDataStream(responseBody);
return response;
return null;
}
}
}

@ -4,7 +4,7 @@ package com.github.cloud.netflix.zuul.filters.support;
*
*
* @author derek()
* @date 2022/6/27
* @date 2022/6/27
*/
public interface FilterConstants {

@ -4,11 +4,10 @@ import com.netflix.zuul.monitoring.CounterFactory;
/**
* @author derek()
* @date 2022/6/27
* @date 2022/6/27
*/
public class EmptyCounterFactory extends CounterFactory {
@Override
public void increment(String name) {
}
}

@ -5,11 +5,25 @@ import com.netflix.zuul.monitoring.TracerFactory;
/**
* @author derek()
* @date 2022/6/27
* @date 2022/6/27
*/
public class EmptyTracerFactory extends TracerFactory {
private final EmptyTracer emptyTracer = new EmptyTracer();
@Override
public Tracer startMicroTracer(String name) {
return null;
return emptyTracer;
}
private static final class EmptyTracer implements Tracer {
@Override
public void setName(String name) {
}
@Override
public void stopAndLog() {
}
}
}
}

@ -1,125 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>3.1.1</version>
<relativePath/>
</parent>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
<modules>
<module>mini-spring-cloud-tutu-discovery</module>
<module>mini-spring-cloud-load-balancer</module>
<module>mini-spring-cloud-openfeign</module>
<module>mini-spring-cloud-netflix-zuul</module>
<module>mini-spring-cloud-examples/tutu-server</module>
<module>mini-spring-cloud-examples/mini-spring-cloud-provider-example</module>
<module>mini-spring-cloud-examples/mini-spring-cloud-consumer-examples</module>
<module>mini-spring-cloud-examples/mini-spring-cloud-api-gateway-example</module>
</modules>
<properties>
<spring.cloud.version>2021.0.1</spring.cloud.version>
<fastjson.version>1.2.79</fastjson.version>
<hutool.version>5.7.21</hutool.version>
<ribbon.version>2.3.0</ribbon.version>
<feign.version>11.8</feign.version>
<zuul.version>1.3.1</zuul.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-tutu-discovery</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-load-balancer</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-openfeign</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-netflix-zuul</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon</artifactId>
<version>${ribbon.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon-loadbalancer</artifactId>
<version>${ribbon.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon-core</artifactId>
<version>${ribbon.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.zuul</groupId>
<artifactId>zuul-core</artifactId>
<version>${zuul.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>3.1.1</version>
<relativePath/>
</parent>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud</artifactId>
<packaging>pom</packaging>
<version>1.0.0-SNAPSHOT</version>
<modules>
<module>mini-spring-cloud-tutu-discovery</module>
<module>mini-spring-cloud-load-balancer</module>
<module>mini-spring-cloud-openfeign</module>
<module>mini-spring-cloud-netflix-zuul</module>
<module>mini-spring-cloud-examples/tutu-server</module>
<module>mini-spring-cloud-examples/mini-spring-cloud-provider-example</module>
<module>mini-spring-cloud-examples/mini-spring-cloud-consumer-examples</module>
<module>mini-spring-cloud-examples/mini-spring-cloud-api-gateway-example</module>
</modules>
<properties>
<spring.cloud.version>2021.0.1</spring.cloud.version>
<fastjson.version>1.2.79</fastjson.version>
<hutool.version>5.7.21</hutool.version>
<ribbon.version>2.3.0</ribbon.version>
<feign.version>11.8</feign.version>
<zuul.version>1.3.1</zuul.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-tutu-discovery</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-load-balancer</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-openfeign</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github</groupId>
<artifactId>mini-spring-cloud-netflix-zuul</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon</artifactId>
<version>${ribbon.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon-loadbalancer</artifactId>
<version>${ribbon.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.ribbon</groupId>
<artifactId>ribbon-core</artifactId>
<version>${ribbon.version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-core</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.zuul</groupId>
<artifactId>zuul-core</artifactId>
<version>${zuul.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Loading…
Cancel
Save