发布于个人的CSDN:https://blog.csdn.net/weixin_43438052/article/details/113989712

提供2中方法,优先选择第一种

(1) .yml 配置文件中直接添加配置

springfox:
  	documentation:
    	swagger:
      		v2:
        		host: ip:8080

(2) Nginx代理转发swagger-ui.html相关路径

location /swagger-ui.html {
    proxy_pass http://ip:port;
    index  index.html index.htm;
}

location /webjars {
	proxy_pass http://ip:port;
    index  index.html index.htm;
}

location /swagger-resources {
  proxy_pass http://ip:port;
  index  index.html index.htm;
}

location /v2 {
  proxy_pass http://ip:port;
  index  index.html index.htm;
}

相关文章:

  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
  • 2021-04-08
  • 2021-06-07
  • 2022-12-23
  • 2021-07-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2021-08-09
  • 2021-11-06
相关资源
相似解决方案