本文整理匯總了Java中springfox.documentation.builders.RequestHandlerSelectors類的典型用法代碼示例。如果您正苦於以下問題:Java RequestHandlerSelectors類的具體用法?Java RequestHandlerSelectors怎麽用?Java RequestHandlerSelectors使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RequestHandlerSelectors類屬於springfox.documentation.builders包,在下文中一共展示了RequestHandlerSelectors類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: api
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(new ApiInfo(
"Smarti",
"the smart in assistify",
apiVersion,
null,
new Contact(
apiContactName,
apiContactUrl,
"[email protected]"
),
"Apache 2.0",
"https://www.apache.org/licenses/LICENSE-2.0",
Collections.emptyList()
))
.select()
.apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
.paths(PathSelectors.any())
.build()
.securitySchemes(Arrays.asList(authToken(), basicAuth()))
.securityContexts(Arrays.asList(publicContext(), defaultContext()))
.ignoredParameterTypes(AuthContext.class)
.directModelSubstitute(ObjectId.class, String.class);
}
示例2: practiceApi
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket practiceApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.sdcuike.practice"))
.paths(PathSelectors.any())
.build()
.pathMapping("/")
.genericModelSubstitutes(ResponseEntity.class)
.alternateTypeRules(
newRule(typeResolver.resolve(DeferredResult.class,
typeResolver.resolve(ResponseEntity.class, WildcardType.class)),
typeResolver.resolve(WildcardType.class)))
.useDefaultResponseMessages(false)
.globalResponseMessage(RequestMethod.GET,
newArrayList(new ResponseMessageBuilder()
.code(500)
.message("500 message")
.responseModel(new ModelRef("Error"))
.build()))
.enableUrlTemplating(true)
.tags(new Tag("Pet Service", "All apis relating to pets"));
}
示例3: createRestApi
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.useDefaultResponseMessages(false)
.globalResponseMessage(RequestMethod.GET, getDefaultResponseMessage())
.globalResponseMessage(RequestMethod.POST, getDefaultResponseMessage())
.globalResponseMessage(RequestMethod.PUT, getDefaultResponseMessage())
.globalResponseMessage(RequestMethod.DELETE, getDefaultResponseMessage())
.directModelSubstitute(Timestamp.class, Date.class)
.tags(new Tag("默認標簽", "定義全局默認標簽"),getTags())
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.plumdo.form"))
.paths(PathSelectors.any())
.build();
}
示例4: api
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)//
.select()//
.apis(RequestHandlerSelectors.any())//
.paths(Predicates.not(PathSelectors.regex("/error")))//
.build()//
.apiInfo(metadata())//
.useDefaultResponseMessages(false)//
.securitySchemes(new ArrayList<>(Arrays.asList(new ApiKey("Bearer %token", "Authorization", "Header"))))//
.tags(new Tag("users", "Operations about users"))//
.tags(new Tag("ping", "Just a ping"))//
.genericModelSubstitutes(Optional.class);
}
示例5: api
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
.pathMapping("/")
.directModelSubstitute(LocalDate.class, String.class)
.genericModelSubstitutes(ResponseEntity.class)
.alternateTypeRules(AlternateTypeRules.newRule(typeResolver.resolve(
DeferredResult.class,
typeResolver.resolve(ResponseEntity.class,
WildcardType.class)),
typeResolver.resolve(
WildcardType.class)))
.useDefaultResponseMessages(false);
}
示例6: customImplementation
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket customImplementation() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("io.pestakit.email.api"))
.build()
.directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class)
.directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class)
.apiInfo(apiInfo());
}
示例7: customImplementation
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket customImplementation() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("io.swagger.api"))
.build()
.directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class)
.directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class)
.apiInfo(apiInfo());
}
示例8: createRestApi
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.crossoverJie.sbcorder.controller"))
.paths(PathSelectors.any())
.build();
}
示例9: api
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2).select()
.apis(RequestHandlerSelectors.basePackage("com.borabeber.api.controllers"))
.paths(PathSelectors.any()).build()
.apiInfo(apiInfo());
}
示例10: customImplementation
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket customImplementation(){
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("io.swagger.api"))
.build()
.directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class)
.directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class)
.apiInfo(apiInfo());
}
示例11: api
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
示例12: api
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("Template")
.select()
.apis(RequestHandlerSelectors.basePackage(TemplateApplication.class.getPackage().getName()))
.paths(PathSelectors.any())
.build()
.apiInfo(getApiInfo());
}
示例13: productApi
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
/**
* Configure Spring Fox.
*
* @return The spring fox docket.
*/
@Bean
public Docket productApi() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.web.web.controller"))
.paths(any())
.build()
.apiInfo(metaData());
}
示例14: api
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.bbva.arq.devops.ae.mirrorgate.api"))
.paths(PathSelectors.any())
.build();
}
示例15: createRestApi
import springfox.documentation.builders.RequestHandlerSelectors; //導入依賴的package包/類
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage(this.basePackage))
.paths(PathSelectors.any()).build();
}