在 Debian 系统里“调试 Swagger”通常分几种场景,我先按最常见情况说明,你可对号入座。
访问:
http://localhost:8080/swagger-ui.html
# 或新版本
http://localhost:8080/swagger-ui/index.html
如果打不开:
curl -i http://localhost:8080/swagger-ui.html
journalctl -u your-service
# 或
tail -f logs/spring.log
常见错误:
Failed to start bean 'documentationPluginsBootstrapper'No qualifying bean of type 'org.springframework.data.rest.core.support.Entity...'spring:
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
sudo ufw status
sudo ufw allow 8080
server:
address: 0.0.0.0
http://localhost:3000/api-docs
ps aux | grep node
netstat -tunlp | grep 3000
docker ps
docker logs swagger-container
访问:
http://<服务器IP>:8080
# 看端口
ss -tunlp
# 看进程
ps aux | grep java
ps aux | grep node
# 看网络
curl -v http://localhost:8080/swagger-ui.html
你可以直接贴一段日志,我帮你逐行看。