Swagger2ControllerWebMvc:Unable to find specification for group 1.0


通过yapi自动同步swagger的接口时发现后台不停的报“Swagger2ControllerWebMvc       : Unable to find specification for group 1.0”错误;

 

 


 

同时yapi提示“Error:Request failed with status code 404.”

 

 

 


 

swagger的相应配置如下:

 

 

 


 

根据控制台错误可知错误发生在Swagger2ControllerWebMvc这个类中;

 


 

开始调试

由于document导致的错误,继续debug看是什么原因导致的document没拿到。进入documentationByGroup方法;

 

 从groupName是default,documentationLookup是一个LinkedHashMap,其中只有v1.0一条数据。

将配置类中的groupName改成default后没出现问题,ok了。和version等于v1.0没有关系;

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM