通過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沒有關系;