Commit ede242943b344a7bb13b526f157959498eec253f

Authored by 潘钊
1 parent 78b0511f

白名单变更

src/main/java/com/bsth/common/Constants.java
@@ -24,8 +24,9 @@ public class Constants { @@ -24,8 +24,9 @@ public class Constants {
24 /** 24 /**
25 * 线调部分子页面不做拦截,便于浏览器缓存 25 * 线调部分子页面不做拦截,便于浏览器缓存
26 */ 26 */
27 - public static final String XD_CHILD_PAGES = "/real_control_v2/**";  
28 - public static final String XD_TEMPS = "/pages/control/line/temps/**"; 27 + public static final String XD_CHILD_PAGES = "/real_control_v2/**";
  28 + public static final String XD_REAL_GPS = "/gps/real/line";
  29 + //public static final String XD_TEMPS = "/pages/control/line/temps/**";
29 30
30 //车载网关上行接口 31 //车载网关上行接口
31 public static final String UPSTREAM_URL = "/control/upstream"; 32 public static final String UPSTREAM_URL = "/control/upstream";
src/main/java/com/bsth/filter/BaseFilter.java
@@ -24,7 +24,7 @@ public abstract class BaseFilter implements Filter { @@ -24,7 +24,7 @@ public abstract class BaseFilter implements Filter {
24 * 白名单 24 * 白名单
25 */ 25 */
26 private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, 26 private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA,
27 - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_TEMPS }; 27 + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS };
28 28
29 @Override 29 @Override
30 public void destroy() { 30 public void destroy() {
src/main/java/com/bsth/oplog/http/HttpOpLogInterceptor.java
@@ -3,8 +3,8 @@ package com.bsth.oplog.http; @@ -3,8 +3,8 @@ package com.bsth.oplog.http;
3 import javax.servlet.http.HttpServletRequest; 3 import javax.servlet.http.HttpServletRequest;
4 import javax.servlet.http.HttpServletResponse; 4 import javax.servlet.http.HttpServletResponse;
5 5
  6 +import com.bsth.common.Constants;
6 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
7 -import org.springframework.stereotype.Component;  
8 import org.springframework.util.AntPathMatcher; 8 import org.springframework.util.AntPathMatcher;
9 import org.springframework.util.PathMatcher; 9 import org.springframework.util.PathMatcher;
10 import org.springframework.web.method.HandlerMethod; 10 import org.springframework.web.method.HandlerMethod;
@@ -25,7 +25,7 @@ public class HttpOpLogInterceptor implements HandlerInterceptor { @@ -25,7 +25,7 @@ public class HttpOpLogInterceptor implements HandlerInterceptor {
25 private final PathMatcher pathMatcher = new AntPathMatcher(); 25 private final PathMatcher pathMatcher = new AntPathMatcher();
26 26
27 // GET 白名单 27 // GET 白名单
28 - private String[] httpGetWhiteList = { "/user/login/**", "/user/currentUser","/dictionary/**", "/module/findByCurrentUser", "/gps/**", "/error/**" }; 28 + private String[] httpGetWhiteList = { "/user/login/**", "/user/currentUser","/dictionary/**", "/module/findByCurrentUser", "/gps/**", "/error/**", Constants.XD_CHILD_PAGES};
29 29
30 // POST 白名单 30 // POST 白名单
31 private String[] httpPostWhiteList = { 31 private String[] httpPostWhiteList = {
src/main/java/com/bsth/security/WebSecurityConfig.java
@@ -36,7 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @@ -36,7 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
36 public void configure(WebSecurity web) throws Exception { 36 public void configure(WebSecurity web) throws Exception {
37 // 白名单 37 // 白名单
38 web.ignoring().antMatchers(Constants.LOGIN_PAGE, Constants.LOGIN, Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.CAPTCHA, 38 web.ignoring().antMatchers(Constants.LOGIN_PAGE, Constants.LOGIN, Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.CAPTCHA,
39 - Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_TEMPS); 39 + Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES);
40 } 40 }
41 41
42 @Override 42 @Override