一个web请求在springboot经历了什么

Posted huaweitman

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了一个web请求在springboot经历了什么相关的知识,希望对你有一定的参考价值。

写了一个MailServiceController接口,在入口处打上断电,debug启动,可以看到

tomcat-embed-core-9.0.36.jar

1  run:748, Thread (java.lang)
2  run:61, TaskThread$WrappingRunnable (org.apache.tomcat.util.threads)
3  run:624, ThreadPoolExecutor$Worker (java.util.concurrent)
4  runWorker:1149, ThreadPoolExecutor (java.util.concurrent)
5  run:49, SocketProcessorBase (org.apache.tomcat.util.net)
6  doRun:1590, NioEndpoint$SocketProcessor (org.apache.tomcat.util.net)
7  process:868, AbstractProtocol$ConnectionHandler (org.apache.coyote)
8  process:65, AbstractProcessorLight (org.apache.coyote)
9  service:373, Http11Processor (org.apache.coyote.http11)
10  service:343, CoyoteAdapter (org.apache.catalina.connector)
11  invoke:74, StandardEngineValve (org.apache.catalina.core)
12  invoke:92, ErrorReportValve (org.apache.catalina.valves)
13  invoke:139, StandardHostValve (org.apache.catalina.core)
14  invoke:541, AuthenticatorBase (org.apache.catalina.authenticator)
15  invoke:96, StandardContextValve (org.apache.catalina.core)
16  invoke:202, StandardWrapperValve (org.apache.catalina.core)
17  doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
18  internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)

spring-web-5.2.7.RELEASE.jar 

19  doFilter:119, OncePerRequestFilter (org.springframework.web.filter)
20  doFilterInternal:201, CharacterEncodingFilter (org.springframework.web.filter)
21  doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
22  internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)
23  doFilter:119, OncePerRequestFilter (org.springframework.web.filter)
24  doFilterInternal:93, WebMvcMetricsFilter (org.springframework.boot.actuate.metrics.web.servlet)
25  doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
26  internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)
27  doFilter:119, OncePerRequestFilter (org.springframework.web.filter)
28  doFilterInternal:93, FormContentFilter (org.springframework.web.filter)
29  doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
30  internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)
31  doFilter:119, OncePerRequestFilter (org.springframework.web.filter)
32  doFilterInternal:100, RequestContextFilter (org.springframework.web.filter)
33  doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
34  internalDoFilter:193, ApplicationFilterChain (org.apache.catalina.core)
35  doFilter:53, WsFilter (org.apache.tomcat.websocket.server)
36  doFilter:166, ApplicationFilterChain (org.apache.catalina.core)
37  internalDoFilter:231, ApplicationFilterChain (org.apache.catalina.core)
38  service:741, HttpServlet (javax.servlet.http)

spring-webmvc-5.2.7.RELEASE.jar  

39  service:883, FrameworkServlet (org.springframework.web.servlet)
40  service:634, HttpServlet (javax.servlet.http)
41  doGet:898, FrameworkServlet (org.springframework.web.servlet)
42  processRequest:1006, FrameworkServlet (org.springframework.web.servlet)
43  doService:943, DispatcherServlet (org.springframework.web.servlet)
44  doDispatch:1040, DispatcherServlet (org.springframework.web.servlet)
45  handle:87, AbstractHandlerMethodAdapter (org.springframework.web.servlet.mvc.method)
46  handleInternal:793, RequestMappingHandlerAdapter (org.springframework.web.servlet.mvc.method.annotation)
47  invokeHandlerMethod:879, RequestMappingHandlerAdapter (org.springframework.web.servlet.mvc.method.annotation)
48  invokeAndHandle:105, ServletInvocableHandlerMethod (org.springframework.web.servlet.mvc.method.annotation)
49  invokeForRequest:138, InvocableHandlerMethod (org.springframework.web.method.support)
50  doInvoke:190, InvocableHandlerMethod (org.springframework.web.method.support)
51  invoke:498, Method (java.lang.reflect)
52  invoke:43, DelegatingMethodAccessorImpl (sun.reflect)
53  invoke:62, NativeMethodAccessorImpl (sun.reflect)
54  invoke0:-1, NativeMethodAccessorImpl (sun.reflect)
55  getMailService:-1, MailServiceController$$EnhancerBySpringCGLIB$$e68c8681 (cn.cuiot.dmp.common.controller)
56  intercept:691, CglibAopProxy$DynamicAdvisedInterceptor (org.springframework.aop.framework)
57  proceed:749, CglibAopProxy$CglibMethodInvocation (org.springframework.aop.framework)
58  proceed:186, ReflectiveMethodInvocation (org.springframework.aop.framework)
59  invoke:95, ExposeInvocationInterceptor (org.springframework.aop.interceptor)
60  proceed:749, CglibAopProxy$CglibMethodInvocation (org.springframework.aop.framework)
61  proceed:186, ReflectiveMethodInvocation (org.springframework.aop.framework)
62  invoke:70, AspectJAroundAdvice (org.springframework.aop.aspectj)
63  invokeAdviceMethod:633, AbstractAspectJAdvice (org.springframework.aop.aspectj)
64  invokeAdviceMethodWithGivenArgs:644, AbstractAspectJAdvice (org.springframework.aop.aspectj)
65  invoke:498, Method (java.lang.reflect)
66  invoke:43, DelegatingMethodAccessorImpl (sun.reflect)
67  invoke:62, NativeMethodAccessorImpl (sun.reflect)
68  invoke0:-1, NativeMethodAccessorImpl (sun.reflect)
69  around:65, ControllerLogAop (cn.cuiot.dmp.common.aop)
70  proceed:88, MethodInvocationProceedingJoinPoint (org.springframework.aop.aspectj)
71  proceed:749, CglibAopProxy$CglibMethodInvocation (org.springframework.aop.framework)
72  proceed:186, ReflectiveMethodInvocation (org.springframework.aop.framework)
73  invoke:70, AspectJAroundAdvice (org.springframework.aop.aspectj)
74  invokeAdviceMethod:633, AbstractAspectJAdvice (org.springframework.aop.aspectj)
75  invokeAdviceMethodWithGivenArgs:644, AbstractAspectJAdvice (org.springframework.aop.aspectj)
76  invoke:498, Method (java.lang.reflect)
77  invoke:43, DelegatingMethodAccessorImpl (sun.reflect)
78  invoke:62, NativeMethodAccessorImpl (sun.reflect)
79  invoke0:-1, NativeMethodAccessorImpl (sun.reflect)
80  doAround:50, ParamValidAop (cn.cuiot.dmp.common.aop)
81  proceed:88, MethodInvocationProceedingJoinPoint (org.springframework.aop.aspectj)
82  proceed:749, CglibAopProxy$CglibMethodInvocation (org.springframework.aop.framework)
83  proceed:186, ReflectiveMethodInvocation (org.springframework.aop.framework)
84  invoke:56, MethodBeforeAdviceInterceptor (org.springframework.aop.framework.adapter)
85  proceed:749, CglibAopProxy$CglibMethodInvocation (org.springframework.aop.framework)
86  proceed:186, ReflectiveMethodInvocation (org.springframework.aop.framework)
87  invoke:55, AfterReturningAdviceInterceptor (org.springframework.aop.framework.adapter)
88  proceed:749, CglibAopProxy$CglibMethodInvocation (org.springframework.aop.framework)
89  proceed:163, ReflectiveMethodInvocation (org.springframework.aop.framework)
90  invokeJoinpoint:771, CglibAopProxy$CglibMethodInvocation (org.springframework.aop.framework)
91  invoke:218, MethodProxy (org.springframework.cglib.proxy)
92  invoke:-1, MailServiceController$$FastClassBySpringCGLIB$$87fd90af (cn.cuiot.dmp.common.controller)
93  getMailService:26, MailServiceController (cn.cuiot.dmp.common.controller)

以上是关于一个web请求在springboot经历了什么的主要内容,如果未能解决你的问题,请参考以下文章

2. 基本请求controller的创建

Web框架的引入

记录 SpringBoot 踩坑经历

springboot 请求映射原理

一次curl http://baidu.com经历了什么?

记一次springboot启动不起来的经历