![](/img/trans.png)
[英]How to resolve error “The following classes could not be excluded because they are not auto-configuration classes”?
[英]Which classes are scanned during the Swagger auto-configuration process?
在Swagger文档中,我读到了@SwaggerDefinition
批注可以放在Swagger自动配置过程中扫描的任何类中。
我将注释放在controller包内的controller类中,并使用dispatcher-servlet.xml
的context:component scan
标签将此包设置为base-package
。 但是,Swagger UI页面仍显示默认标题,联系电子邮件等,这意味着它没有拿起我的@SwaggerDefinition
。
我该如何解决这个问题? 任何指针将不胜感激。 Kinda失去了atm。 谢谢!
在springfox中,@ SwaggerDefinition等效于使用Docket中的api来定制服务描述。 springfox不支持@SwaggerDefinition注释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.