有可能出現的原因:
1.Security將訪問攔截掉了
2.給攔截器攔截了
3.Swagger返回的結果,被自己定義的攔截器or其他方式給篡改了數據,導致無法正常顯示,也就無法得到想要的結果
//忽略swagger訪問權限限制 .antMatchers( "/userlogin", "/userlogout", "/userjwt", "/v2/api-docs", "/swagger-resources/configuration/ui", "/swagger-resources", "/swagger-resources/configuration/security", "/swagger-ui.html", "/css/**", "/js/**", "/images/**", "/webjars/**", "/import/test", "**/favicon.ico", "/index").permitAll()
其中
"/v2/api-docs",
"/swagger-resources/configuration/ui",
"/swagger-resources",
"/swagger-resources/configuration/security",
"/swagger-ui.html",
這幾項必須都加上才生效。