java.lang.IllegalStateException: Failed to introspect Class [springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
Caused by: java.lang.NoClassDefFoundError:org/springframework/web/servlet/HandlerMapping
出现这异常,找了好久,原来是忘记添加依赖了
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
仅个人记录出现的问题
在尝试使用Springfox进行Swagger2配置时,遇到了`java.lang.IllegalStateException`,原因是缺少`org.springframework.web.servlet.HandlerMapping`类。问题的解决方案是添加`spring-boot-starter-web`依赖到项目中。
5891

被折叠的 条评论
为什么被折叠?



