0
点赞
收藏
分享

微信扫一扫

swagger集成到springboot遇到的问题

JakietYu 2022-05-01 阅读 63
spring boot

swagger集成到springboot遇到的问题

提示:这里简述项目相关背景:


No operations defined in spec!

提示:这里描述项目中遇到的问题:

页面没有借口列表,其他正常


原因分析:

没找到接口


解决方案:

看看配置类的basePackage路径是不是controller包的相对路径

documentationPluginsBootstrapper 创建失败

提示:这里描述项目中遇到的问题:

springboot启动过程中,在refresh方法中报空指针


原因分析:

版本问题,springboot 2.6以上版本默认mvc path是path_pattern_parser,而swagger无法根据这个匹配


解决方案:

yml配置
mvc:
pathmatch:
matching-strategy: ant_path_matcher

举报

相关推荐

0 条评论