mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
init
This commit is contained in:
@@ -17,10 +17,26 @@ public abstract class BaseZuulFilter extends ZuulFilter {
|
||||
|
||||
private Integer filterOrder;
|
||||
|
||||
/**
|
||||
* 获取过滤器类型
|
||||
* @return 返回FilterType
|
||||
* @see ZuulFilter#filterType() filterType()
|
||||
*/
|
||||
protected abstract FilterType getFilterType();
|
||||
|
||||
/**
|
||||
* 获取过滤器顺序
|
||||
* @return
|
||||
* @see ZuulFilter#filterOrder() filterOrder()
|
||||
*/
|
||||
protected abstract int getFilterOrder();
|
||||
|
||||
/**
|
||||
* 执行run
|
||||
* @param requestContext
|
||||
* @return
|
||||
* @throws ZuulException
|
||||
*/
|
||||
protected abstract Object doRun(RequestContext requestContext) throws ZuulException;
|
||||
|
||||
/**
|
||||
|
@@ -7,7 +7,17 @@ import org.springframework.cloud.netflix.zuul.filters.Route;
|
||||
* @author tanghc
|
||||
*/
|
||||
public interface ApiMetaContext {
|
||||
/**
|
||||
* 重新加载接口信息
|
||||
* @param serviceId
|
||||
* @param serviceApiInfo
|
||||
*/
|
||||
void reload(String serviceId, ServiceApiInfo serviceApiInfo);
|
||||
|
||||
/**
|
||||
* 获取接口对应的route信息
|
||||
* @param nameVersion
|
||||
* @return
|
||||
*/
|
||||
Route getRoute(String nameVersion);
|
||||
}
|
||||
|
@@ -4,7 +4,18 @@ package com.gitee.sop.gatewaycommon.result;
|
||||
* @author tanghc
|
||||
*/
|
||||
public interface ResultExecutor {
|
||||
/**
|
||||
* 合并结果
|
||||
* @param responseStatus
|
||||
* @param responseData
|
||||
* @return
|
||||
*/
|
||||
String mergeResult(int responseStatus, String responseData);
|
||||
|
||||
/**
|
||||
* 合并错误结果
|
||||
* @param throwable
|
||||
* @return
|
||||
*/
|
||||
String mergeError(Throwable throwable);
|
||||
}
|
||||
|
@@ -7,6 +7,7 @@ public interface SignEncipher {
|
||||
/**
|
||||
* 签名的摘要算法
|
||||
* @param input 待签名数据
|
||||
* @param secret 秘钥
|
||||
* @return 返回加密后的数据
|
||||
*/
|
||||
byte[] encrypt(String input, String secret);
|
||||
|
Reference in New Issue
Block a user