💥 修改为私有方法
This commit is contained in:
parent
d62510f9b5
commit
c93ebf445f
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.common.core.utils;
|
package com.ruoyi.common.core.utils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -10,7 +12,7 @@ import java.util.regex.Pattern;
|
||||||
*/
|
*/
|
||||||
public class AuthUtils {
|
public class AuthUtils {
|
||||||
|
|
||||||
public static String getRegPath(String path) {
|
private static String getRegPath(String path) {
|
||||||
char[] chars = path.toCharArray();
|
char[] chars = path.toCharArray();
|
||||||
int len = chars.length;
|
int len = chars.length;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
@ -55,7 +57,7 @@ public class AuthUtils {
|
||||||
* @param reqUrl - 请求地址
|
* @param reqUrl - 请求地址
|
||||||
* @return true/false
|
* @return true/false
|
||||||
*/
|
*/
|
||||||
public static boolean filterUrls(String excludePath, String reqUrl) {
|
private static boolean filterUrls(String excludePath, String reqUrl) {
|
||||||
String regPath = getRegPath(excludePath);
|
String regPath = getRegPath(excludePath);
|
||||||
return Pattern.compile(regPath).matcher(reqUrl).matches();
|
return Pattern.compile(regPath).matcher(reqUrl).matches();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue