赞
踩
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
Docket docket=new Docket(DocumentationType.SWAGGER_2)
.globalResponseMessage(RequestMethod.GET, responseMessageList)
.globalResponseMessage(RequestMethod.POST, responseMessageList)
.globalResponseMessage(RequestMethod.PUT, responseMessageList)
.globalResponseMessage(RequestMethod.DELETE, responseMessageList)
.apiInfo(apiInfo())
//分组名称
.groupName("业务接口")
.select()
//这里指定Controller扫描包路径
.apis( Predicates.or(
RequestHandlerSelectors.basePackage("com.xxx.application.controller"),
RequestHandlerSelectors.basePackage("com.xxx.userinterface.controller")
))
.paths(PathSelectors.any())
.build()
.securitySchemes(security())
.ignoredParameterTypes(LoginUser.class);;
return docket;
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。