This commit is contained in:
冷冷 2018-05-21 21:12:07 +08:00
parent 24b511159f
commit 59da4522c1
3 changed files with 2 additions and 57 deletions

View File

@ -1,55 +0,0 @@
package com.github.pig.common.vo;
import lombok.Data;
/**
* @author lengleng
* @date 2018/5/15
* 自定义路由实体
*/
@Data
public class ZuulRouteVO {
/**
* router ID
*/
private String id;
/**
* The path (pattern) for the route, e.g. /foo/**.
*/
private String path;
/**
* The service ID (if any) to map to this route. You can specify a physical URL or
* a service, but not both.
*/
private String serviceId;
/**
* A full physical URL to map to the route. An alternative is to use a service ID
* and service discovery to find the physical address.
*/
private String url;
/**
* Flag to determine whether the prefix for this route (the path, minus pattern
* patcher) should be stripped before forwarding.
*/
private Boolean stripPrefix;
/**
* Flag to indicate that this route should be retryable (if supported). Generally
* retry requires a service ID and ribbon.
*/
private Boolean retryable;
/**
* 是否开启
*/
private Boolean enabled;
/**
* 微服务敏感的header
*/
private String sensitiveHeadersList;
}

View File

@ -10,7 +10,7 @@ spring:
config:
server:
git:
uri: https://gitee.com/hsLeng/pig-config.git
uri: https://gitee.com/cqzqxq_lxh/pig-config.git
default-label: ${spring.profiles.active} #解决监控down
# 关闭安全管理

View File

@ -87,7 +87,7 @@ public class DynamicRouteLocator extends DiscoveryClientRouteLocator {
ZuulProperties.ZuulRoute zuulRoute = new ZuulProperties.ZuulRoute();
try {
zuulRoute.setId(String.valueOf(result.getId()));
zuulRoute.setId(result.getServiceId());
zuulRoute.setPath(result.getPath());
zuulRoute.setServiceId(result.getServiceId());
zuulRoute.setRetryable(StrUtil.equals(result.getRetryable(), "0") ? Boolean.FALSE : Boolean.TRUE);