mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 20:08:40 +08:00
白名单 没有set 变量
This commit is contained in:
parent
bfef0de2ba
commit
d3231191d3
@ -11,6 +11,7 @@ import io.jpom.system.ExtConfigBean;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@ -116,7 +117,7 @@ public class AgentWhitelist extends BaseJsonModel {
|
||||
* @param jsonArray jsonArray
|
||||
* @return str
|
||||
*/
|
||||
public static String convertToLine(List<String> jsonArray) {
|
||||
public static String convertToLine(Collection<String> jsonArray) {
|
||||
try {
|
||||
return CollUtil.join(jsonArray, StrUtil.CRLF);
|
||||
} catch (Exception e) {
|
||||
|
@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -55,7 +56,7 @@ public class WhitelistDirectoryController extends BaseServerController {
|
||||
*/
|
||||
Field[] fields = ReflectUtil.getFields(AgentWhitelist.class);
|
||||
for (Field field : fields) {
|
||||
List<String> fieldValue = (List<String>) ReflectUtil.getFieldValue(agentWhitelist, field);
|
||||
Collection<String> fieldValue = (Collection<String>) ReflectUtil.getFieldValue(agentWhitelist, field);
|
||||
map.put(field.getName(), AgentWhitelist.convertToLine(fieldValue));
|
||||
}
|
||||
// map.put("project", AgentWhitelist.convertToLine(agentWhitelist.getProject()));
|
||||
|
Loading…
Reference in New Issue
Block a user