This commit is contained in:
tanghc
2020-07-28 18:21:01 +08:00
parent ee30f18d53
commit 0fea955db9
165 changed files with 918 additions and 4838 deletions

View File

@@ -0,0 +1,22 @@
package com.gitee.sop.gateway;
import junit.framework.TestCase;
import org.apache.commons.lang.StringUtils;
/**
* @author tanghc
*/
public class ExcludeTest extends TestCase {
public void testRegex() {
String serviceId = "com.aaa.bbb.story-service";
String sopServiceExcludeRegex = "com\\..*;story\\-.*";
if (StringUtils.isNotBlank(sopServiceExcludeRegex)) {
String[] regexArr = sopServiceExcludeRegex.split(";");
for (String regex : regexArr) {
if (serviceId.matches(regex)) {
System.out.println("111");
}
}
}
}
}