解决"Failed to start bean 'documentationPluginsBootstrapper';nested"
集成swagger出现下面的错误
org.springframework.context.ApplicationContextException:
Failed to start bean 'documentationPluginsBootstrapper';
nested exception is java.lang.NullPointerException
解决办法:在启动类加一个注解@EnableWebMvc
上边的方法可能会解决swagger导致的项目不能启动的问题,但是进入swagger的页面还是会出错。经过一系列的查找最终发现
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
加一行配置可以解决swagger的继承报错,原因是因为swagger升级2.6x之后和springboot出现了不兼容情况。
两种方法解决,一种是上面说的修改配置文件,另外一种是降级swagger。
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 Eternal Night
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果