引入Spring Web MVC依赖
https://mvnrepository.com/artifact/org.springframework/spring-webmvc
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.3.8</version>
</dependency>
</dependencies>
附属依赖如图。
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c653310d3c7c041160c00030a8095e06.png)
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/3d11f5db012166468dcc526fe0bd6310.png)