Spring Boot 项目启动时,抛出无法访问javax.servlet.Filter找不到javax.servlet.Filter的类文件的解决方法
(1)问题描述启动 Spring Boot 项目时,抛出该问题:双击该问题,跳转到 WebSecurityConfigurerAdapter 类:(2)原因分析因为这个 WebSecurityConfigurerAdapter 类内部依赖了 spring-boot-starter-web,而我们的项目又没有引入这个包。(3)问题解决在 pom.xml 中引入spring-boot-starter-
·
(1) 问题描述
启动 Spring Boot 项目时,抛出该问题:
双击该问题,跳转到 WebSecurityConfigurerAdapter 类:
(2) 原因分析
因为这个 WebSecurityConfigurerAdapter 类内部依赖了 spring-boot-starter-web,而我们的项目又没有引入这个包。
(3) 问题解决
在 pom.xml 中引入spring-boot-starter-web:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
更多推荐
所有评论(0)