http请求处理流程优化.
This commit is contained in:
+4
-1
@@ -41,7 +41,10 @@ public class Test1Controller {
|
||||
|
||||
@GetMapping("hello")
|
||||
public String hello() {
|
||||
System.out.println("拿到参数 a = " + HttpContextHolder.getHttpRequestParser().getParameterForInteger("a"));
|
||||
System.out.println("拿到参数 a = " + HttpContextHolder.getHttpRequestParser().getParameter("a"));
|
||||
if ("aaa".equals(HttpContextHolder.getHttpRequestParser().getParameter("a"))) {
|
||||
throw new RuntimeException("hhhh 异常了!");
|
||||
}
|
||||
return test1Service.hello();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user