SSM+Swagger問題解決 Can‘t read swagger JSON from http://localhost:8080/xxx/swagger/api-docs
Can’t read swagger JSON
最近在做一個SpringMVC專案的時候想要整合一下Swagger,於是按照步驟加入了maven依賴,配置xml檔案等,結果最後出現了
Can't read swagger JSON from http://localhost:8080/xxx/swagger/api-docs
最終解決方法:
在web.xml里加入對映,程式碼如下:
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/swagger-resources</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/v2/</url-pattern>
</servlet-mapping>
相關文章
- 解決can't find -lGL的問題
- 【linux】Can't connect to MySQL server on 'XXX' (13)問題解決方式LinuxMySqlServer
- MySQL問題記錄--Can't connect to MySQL server on localhost (10061)解決方法MySqlServerlocalhost
- help:about access http://localhost:8080/HTTPlocalhost
- help:about jboss access http://localhost:8080/HTTPlocalhost
- linux上“rman can't open target”問題解決Linux
- Mysql:Variable 'XXXt' can't be set to the value of 'NULL'解決MySqlNull
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- 解決json顯示日期帶T的問題。JSON
- mysql啟動時報錯Can't read from messagefile errmsg.sysMySql
- Navicat 連線 MySQL 失敗:2002-can‘t connect to server on localhost(10061)問題解決MySqlServerlocalhost
- 問題解決zipimport.ZipImportError: can‘t decompress data; zlib not availablImportErrorAI
- python報錯問題解決:'ascii' codec can't encode characterPythonASCII
- Access denied for user ‘root‘@‘localhost‘問題的解決localhost
- 解決Can not allocate log問題的方法
- 阿里雲 Redis 報出You can't read against a non-read redis.解決方案阿里RedisAI
- Spring Boot如何生成swagger.json?Spring BootSwaggerJSON
- Supervisor 解決 can't find command *
- springboot和swagger2衝突 Swagger-ui/index.html 404 解決Spring BootSwaggerUIIndexHTML
- You can‘t specify target table ‘Person‘ for update in FROM clause
- 解決mysql"Access denied fot user 'root'@'localhost'"問題MySqllocalhost
- swaggerSwagger
- swagger不顯示註釋解決辦法Swagger
- can't create PID file問題處理
- 【問題解決】java.sql.SQLException: null, message from server: “Host ‘xxx.xx.xx.xxx‘ is blocked because ofJavaSQLExceptionNullServerBloC
- could not autowire. No beans of 'xxxx' 問題解決Bean
- cordova 解決can’t not find moudle " plugman platform ios"PlatformiOS
- mysql中You can’t specify target table for update in FROM clMySql
- Swagger3註解使用Swagger
- swagger常用註解搬運Swagger
- Nginx 配置訪問 swagger 頁面NginxSwagger
- 關於收到localhost modprobe: modprobe: Can't locate module ethX的錯誤localhost
- HTTP代理可以解決哪些問題?HTTP
- KCBR: Number of read descriptors = 4096 問題解決
- Git:warning: CALF wilL be replaced by LF in xxxx 問題解決Git
- Swagger3 更新配置詳解Swagger
- javamelody與swagger註解衝突JavaSwagger
- "ScrollView can host only one direct child"問題解決View