Commit d9480e6a by wang_jiaxing

校验注解

parent edeee2d8
......@@ -31,6 +31,9 @@ public class AuthorizationInterceptor implements HandlerInterceptor {
@Autowired
private AuthorizationMapper authorizationMapper;
public static String appId = "founder.appId";
public static String appSecret = "founder.appSecret";
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
if (!(handler instanceof HandlerMethod)) {
......@@ -64,8 +67,8 @@ public class AuthorizationInterceptor implements HandlerInterceptor {
response.setContentType("application/json; charset=utf-8");
boolean success = true;
String message = "";
String appId = request.getHeader("founder.appId");
String appSecret = request.getHeader("founder.appSecret");
String appId = request.getHeader(AuthorizationInterceptor.appId);
String appSecret = request.getHeader(AuthorizationInterceptor.appSecret);
if (StringUtils.isEmpty(appId)) {
success = false;
message = "appId为空,不能查询!";
......
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