基于Java实现mvc设计模型的请求驱动类型的轻量级Web框架,属于SpringFrameWork的后续产品,已经融入到Spring web flow中
![在这里插入图片描述](https://img-blog.csdnimg.cn/8e8b396a897d414a9a9eeeafac72e018.png
1、导入包
2、配置Servlet
3、编写POJO(Controller)
4、POJO使用注解配置到Spring容器中(@Controller)
5、配置Spring-mvc.xml配置文件(配置组件扫描)
org.springframework
spring-webmvc
5.2.6.RELEASE
DispatcherServlet
org.springframework.web.servlet.DispatcherServlet
DispatcherServlet
/
@Controller
public class UserController {
@RequestMapping("/quick")
public String save(){
System.out.println("Controller save running ...");
return "success.jsp";
}
}
DispatcherServlet
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:spring-mvc.xml
DispatcherServlet
/