Commit c7b6ede8 authored by Quxl's avatar Quxl

x

parent 5ff10c80
......@@ -11,10 +11,11 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import com.alibaba.fastjson.JSON;
import com.egolm.common.GsonUtil;
import com.egolm.common.MD5Util;
import com.egolm.common.StringUtil;
......@@ -33,6 +34,7 @@ public class OpenInterceptor extends HandlerInterceptorAdapter {
/*签名规则:1.按照参数字段名ASCII码排序;2.参数进行url拼接;3.加上签名字符串secret;4.得到字符串后进行SHA1签名;5.将签名得到的字符串加入参数列表中,字段名为sig*/
@Override
public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
logger.debug(JSON.toJSONString(req.getParameterMap()));
String uri = req.getRequestURI();
if((uri.indexOf("swagger") == -1 && uri.indexOf("/v2/api-docs") == -1) ) {
Map<String, String[]> paramMap = req.getParameterMap();
......
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