diff --git a/epmet-gateway/pom.xml b/epmet-gateway/pom.xml
index 61c4e5aa1d..f0db9ddace 100644
--- a/epmet-gateway/pom.xml
+++ b/epmet-gateway/pom.xml
@@ -170,8 +170,8 @@
lb://resi-home-server
- lb://gov-voice-server
-
+
+ http://localhost:8105
lb://resi-voice-server
diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
index c89af5abfb..fd2b02e4e5 100644
--- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
+++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
@@ -38,11 +38,12 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
-import com.epmet.commons.tools.validator.group.AddGroup;
-import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.constant.*;
import com.epmet.dao.*;
-import com.epmet.dto.*;
+import com.epmet.dto.ArticleVisitRecordDTO;
+import com.epmet.dto.CustomerStaffDTO;
+import com.epmet.dto.DraftCoverDTO;
+import com.epmet.dto.DraftDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.*;
@@ -66,7 +67,6 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
-import javax.swing.text.StringContent;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
@@ -173,6 +173,12 @@ public class ArticleServiceImpl extends BaseServiceImpl
4.0.0
- 0.3.6
+ 0.3.7
epmet-openapi-scan
jar
diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java
index 8b331effc6..6ec719587e 100644
--- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java
+++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/config/WebAppConfig.java
@@ -25,7 +25,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(scanApiAuthInterceptor)//添加拦截器
.addPathPatterns("/**") //拦截所有请求
- .excludePathPatterns("/UserCon/**");//对应的不拦截的请求
+ .excludePathPatterns("/opback/addWhite*");//对应的不拦截的请求
}
}
diff --git a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/BackDoorController.java b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/BackDoorController.java
index db1807ca3c..433ff1b06d 100644
--- a/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/BackDoorController.java
+++ b/epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/controller/BackDoorController.java
@@ -1,36 +1,32 @@
package com.epmet.openapi.scan.controller;
import com.alibaba.fastjson.JSON;
-import com.epmet.commons.tools.utils.Result;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
+import com.epmet.openapi.scan.common.redis.RedisKeys;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.SetOperations;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.Set;
/**
* @author jianjun liu
* @date 2020-06-04 20:39
**/
@RestController
-@RequestMapping("test")
+@RequestMapping("opback")
public class BackDoorController {
- @Value("${aliyun.green.accessKeyId}")
- private String accessKeyId;
+ @Autowired
+ private RedisTemplate redisTemplate;
- @Value("${aliyun.green.accessKeySecret}")
- private String accessKeySecret;
-
- @Value("${aliyun.green.regionId}")
- private String regionId;
- @GetMapping("api")
- public Result page() {
- Map map = new HashMap<>();
- map.put(accessKeyId,accessKeyId);
- map.put(accessKeySecret,accessKeySecret);
- map.put(regionId, regionId);
- return new Result().ok(JSON.toJSONString(map));
+ @RequestMapping("addWhite")
+ public String addWhite(@RequestParam String ip) {
+ SetOperations setOperations = redisTemplate.opsForSet();
+ String whiteList = RedisKeys.getWhiteList();
+ Long add = setOperations.add(whiteList, ip);
+ Set members = setOperations.members(whiteList);
+ return "ip:" + ip + "添加" + (add > 0 ? "成功" : "失败") + ",当前所有列表:" + JSON.toJSONString(members);
}
}
diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/readme b/epmet-openapi/epmet-openapi-scan/src/main/resources/readme
new file mode 100644
index 0000000000..5b2e138e3e
--- /dev/null
+++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/readme
@@ -0,0 +1,2 @@
+#添加白名单
+sadd epmet:openapi:scan:whitelist "客户端ip地址"
\ No newline at end of file