SpringMVC

1.SpringMVC请求流程图

 

 SpringMVC案列

1.导入依赖

<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>5.1.5.RELEASE</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>5.1.5.RELEASE</version>
    </dependency>
View Code

2.创建Controller类

 

 3.大配置

 

4.Web.xml

 

 5.index.jsp页面

6.目录

 

 注解版

1.Controller

 

 2.大配置

 

 

 开启图片支持

 

 

 

 

posted @ 2019-11-07 16:57  林染plus  阅读(122)  评论(0编辑  收藏  举报