自动封禁优化

master
mengchengzhen 2021-06-07 16:32:18 +08:00
parent cd36f11f07
commit 72e9440a8b
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,8 @@ package com.jmfy;
*/
import com.jmfy.utils.JsonUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
@ -23,6 +25,7 @@ import java.util.HashMap;
*/
@Configuration
public class WebSecurityConfig extends WebMvcConfigurerAdapter{
private static final Logger LOGGER = LoggerFactory.getLogger(WebSecurityConfig.class);
public final static String SESSION_KEY="username";
@Bean
@ -52,6 +55,7 @@ public class WebSecurityConfig extends WebMvcConfigurerAdapter{
}
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
String source = parameterMap.get("source");
LOGGER.info("source:"+source);
if(source!=null && source.equals("skyeye")){
return true;
}