mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
2021-03-25优化代码
This commit is contained in:
@@ -82,6 +82,7 @@ public class AdminController {
|
||||
}
|
||||
return "admin/index";
|
||||
}else{
|
||||
System.out.println("重定向到首页");
|
||||
return "redirect:/";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
||||
String line = "";
|
||||
StringBuilder body = new StringBuilder();
|
||||
int counter = 0;
|
||||
|
||||
// 读取POST提交的数据内容
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(stream, Charset.forName("UTF-8")));
|
||||
try {
|
||||
|
||||
@@ -5,14 +5,8 @@ import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
|
||||
public class TestUrl {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
//testUrl("http://1.3.3.3/test");
|
||||
//最好使用下面这个,上面那个超时时间不定,所以可能会导致卡住的情况
|
||||
testUrlWithTimeOut("http://tc.hellohao.cn2/getNoticeText", 2000);
|
||||
}
|
||||
|
||||
//最好使用下面这个,上面那个超时时间不定,所以可能会导致卡住的情况
|
||||
// testUrlWithTimeOut("http://tc.hellohao.cn2/getNoticeText", 2000);
|
||||
public static void testUrl(String urlString){
|
||||
|
||||
long lo = System.currentTimeMillis();
|
||||
@@ -44,6 +38,5 @@ public class TestUrl {
|
||||
url = null;
|
||||
return false;
|
||||
}
|
||||
//System.out.println(System.currentTimeMillis()-lo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user