You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
3 years ago
|
package com.fr.plugin;
|
||
|
|
||
|
import com.fr.decision.fun.impl.BaseHttpHandler;
|
||
|
import com.fr.stable.StringUtils;
|
||
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod;
|
||
|
import com.fr.web.utils.WebUtils;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
public class ChangeConfigHander extends BaseHttpHandler {
|
||
|
@Override
|
||
|
public RequestMethod getMethod() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getPath() {
|
||
|
return "/change1";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean isPublic() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception {
|
||
|
String config = req.getParameter("config");
|
||
|
FilterMeConfig instance = FilterMeConfig.getInstance();
|
||
|
if (StringUtils.isBlank(config)) {
|
||
|
instance.setAdminFlags("");
|
||
|
} else {
|
||
|
instance.setAdminFlags(config);
|
||
|
}
|
||
|
WebUtils.printAsString(res, "success");
|
||
|
}
|
||
|
}
|