SpringMVC深入使用 (一)基于XML配置的使用
(1)配置
1.SpringMVC基础配置
2.XML配置Controller,HandlerMapping组件映射
3.XML配置ViewResolver组件映射
(2)步骤
1.在pom.xml中导入jar包
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> </dependency> <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.1.3.RELEASE</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> </dependency>