swagger不显示controller接口问题的解决

 如上图所示的swagger页面不显示下面的部分,项目可以正常运行,没有报错。

 解决办法:

swagger的服务调用中common中 的swagger配置类所在的包路径必须和调用swagger的controller的路径名相同,比如com.example和com.example.demo.controller

swagger的所在包必须和controller平级或者是controller的父级

如图,此处的包名必须和引用它的项目的包名一致

 

猜你喜欢

转载自blog.csdn.net/weixin_42821448/article/details/119720524