Commit 22b44240 authored by Quxl's avatar Quxl

x

parent 335b8f24
...@@ -25,7 +25,7 @@ import com.egolm.shop.util.ShopContstrant; ...@@ -25,7 +25,7 @@ import com.egolm.shop.util.ShopContstrant;
@Component @Component
public class OpenInterceptor extends HandlerInterceptorAdapter { public class OpenInterceptor extends HandlerInterceptorAdapter {
private static final Log logger = LogFactory.getLog(OpenInterceptor.class); Log logger = LogFactory.getLog(OpenInterceptor.class);
String encoding = "UTF-8"; String encoding = "UTF-8";
@Autowired @Autowired
...@@ -34,7 +34,6 @@ public class OpenInterceptor extends HandlerInterceptorAdapter { ...@@ -34,7 +34,6 @@ public class OpenInterceptor extends HandlerInterceptorAdapter {
/*签名规则:1.按照参数字段名ASCII码排序;2.参数进行url拼接;3.加上签名字符串secret;4.得到字符串后进行SHA1签名;5.将签名得到的字符串加入参数列表中,字段名为sig*/ /*签名规则:1.按照参数字段名ASCII码排序;2.参数进行url拼接;3.加上签名字符串secret;4.得到字符串后进行SHA1签名;5.将签名得到的字符串加入参数列表中,字段名为sig*/
@Override @Override
public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception { public boolean preHandle(HttpServletRequest req, HttpServletResponse resp, Object handler) throws Exception {
logger.debug(JSON.toJSONString(req.getParameterMap()));
String uri = req.getRequestURI(); String uri = req.getRequestURI();
if((uri.indexOf("swagger") == -1 && uri.indexOf("/v2/api-docs") == -1) ) { if((uri.indexOf("swagger") == -1 && uri.indexOf("/v2/api-docs") == -1) ) {
Map<String, String[]> paramMap = req.getParameterMap(); 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