SpringWebMVC官⽅⽂档
Spring Web MVC
DispatcherServlet()
Special Bean Types (核⼼⼯作组件)
HandlerMapping
HandlerAdapter
org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping
org.springframework.web.hod.annotation.RequestMappingHandlerMapping
org.springframework.web.servlet.function.support.RouterFunctionMapping
org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter
org.springframework.web.hod.annotation.RequestMappingHandlerAdapter
org.springframework.web.servlet.function.support.HandlerFunctionAdapter
定义⼀个Handler的⽅法,第⼀种使⽤@RequestMapping注解,第⼆种实现Controller接⼝(这个接⼝很古⽼),第三种实现HttpRequestHandler接⼝或者继承HttpServlet以此创建⼀个servlet
⽤注解@RequestMapping定义的Handler,⽤的是RequestMappingHandlerMapping,其他两种,⽤的是BeanNameUrlHandlerMapping,静态资源的请求,⽤的是SimpleUrlHandlerMapping
HandlerMapping
Annotated Controllers(基于注解)
Request Mapping
@RequestMapping
mvc的controller
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论