swagger2 不出来接口

-feihong 2017-12-26 11:34:13
能访问首页不出接口
swagger配置:
求大神看看
...全文
8074 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
韩_师兄 2020-12-08
  • 打赏
  • 举报
回复
引用 11 楼 cruise-peng 的回复:
配置类SwaggerConfig上加 @ComponentScan("com.tpdog.controller")扫描的controller 才生效
是的,要加上扫描才行.
cruise-peng 2020-12-06
  • 打赏
  • 举报
回复
配置类SwaggerConfig上加 @ComponentScan("com.tpdog.controller")扫描的controller 才生效
cruise-peng 2020-12-06
  • 打赏
  • 举报
回复
配置类SwaggerConfig上加 @ComponentScan("com.tpdog.controller")扫描的controller 才生效
爱自由� 2019-09-09
  • 打赏
  • 举报
回复
少了一块配置 @Override public void configure(WebSecurity web) throws Exception{ web.ignoring().antMatchers("/v2/**","/swagger-resources/**","/webjars/**","/swagger-ui.html"); }
  • 打赏
  • 举报
回复
把中间的basePackage改成你自己的包
xyc_1306707007 2018-07-10
  • 打赏
  • 举报
回复
路径,扫描路径一般会出问题
MavenTalk 2018-03-15
  • 打赏
  • 举报
回复
引用 2 楼 Leon_190 的回复:
加个注解试试@ComponentScan("packageUrl")
经鉴定有效
Leon_190 2018-02-12
  • 打赏
  • 举报
回复
加个注解试试@ComponentScan("packageUrl")
haha__11 2017-12-29
  • 打赏
  • 举报
回复
1、看看扫描包的路径有没有错。 2、看看web.xml中servlet-mapping 的 url_pattern有没有问题

24,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧