关于springboot中使用swagger报错context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper';nested exception is java.lang.NullPointerException
这是由于springboot和swagger版本冲突问题引起的
解决:1.可以调低版本
2.在yml中加入配置就ok
mvc:
pathmatch:
matching-strategy: ant_path_matcher
3.在启动类中添加注解(这个慎用,不知道啥原因)
@EnableWebMvc
例如:

本文介绍了SpringBoot中使用Swagger出现context.ApplicationContextException错误的原因及解决办法,包括调整版本、配置路径匹配策略以及使用@EnableWebMvc注解。
989

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



