[Bug0002]小白拉取到的Github源码访问swagger-ui.html出错

问题

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

别人原因

SpringBoot的启动类(类名上面有@SpringBootApplication注解 )与controller包不在同一个目录下

尝试了一圈之后发现自己访问的是http://localhost:8000/swagger-ui

原因

应该访问的是swagger-ui.html页面(真是石乐志)

解决方案

应该访问的是http://localhost:8000/swagger-ui.html (注意+html)

posted @ 2022-01-26 23:22  Code7Rain  阅读(84)  评论(0)    收藏  举报