springboot v2.6.1 无法整合 knif4j

发布于 2022-08-17 12:59:20 字数 429 浏览 16 评论 4

在springboot v2.6.1 中使用knif4j 开放文档,会导致项目无法启动,文档无法形成。

> Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.toString()" because the return value of "springfox.documentation.spi.service.contexts.Orderings.patternsCondition(springfox.documentation.RequestHandler)" is null

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

纵情客 2022-08-19 23:30:09

有几方面影响,引用springbootadmin会出现还有就是少

<dependency>
    <groupId>com.fasterxml.jackson.dataformat</groupId>
    <artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
深陷 2022-08-19 18:26:41

楼上+1,整个debug走了一下,

智商已欠费 2022-08-19 10:27:26

设置了这个参数还是不行呢?还有其他注意项吗?谢谢

淡笑忘祈一世凡恋 2022-08-19 09:18:19

Springboot2.6以后将SpringMVC 默认路径匹配策略从AntPathMatcher 更改为PathPatternParser,导致出错,解决办法是切换会原先的AntPathMatcher。

spring.mvc.pathmatch.matching-strategy=ant-path-matcher
 

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文