自动封禁优化

master
mengchengzhen 2021-06-07 16:12:30 +08:00
parent 228c6063d3
commit cd36f11f07
1 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@ package com.jmfy;
* Created by huangds on 2017/10/24.
*/
import com.jmfy.utils.JsonUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
@ -15,6 +16,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.HashMap;
/**
*
@ -47,6 +49,11 @@ public class WebSecurityConfig extends WebMvcConfigurerAdapter{
// 判断是否已有该用户登录的session
if (request.getParameterMap().size() == 0){
}
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
String source = parameterMap.get("source");
if(source!=null && source.equals("skyeye")){
return true;
}
if(session.getAttribute(SESSION_KEY) != null){
return true;