springfox.documentation.spi.DocumentationType配置示例
Java Code Examples for springfox.documentation.spi.DocumentationType
The following are top voted examples for showing how to use springfox.documentation.spi.DocumentationType. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to product more good examples.
Project: Learny---Server File: SwaggerConfig.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket learnyApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class,String.class).genericModelSubstitutes(ResponseEntity.class).useDefaultResponseMessages(false).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Project: jhipster_myapp File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket() {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();Docket swaggerSpringMvcPlugin = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)) // and by paths.build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return swaggerSpringMvcPlugin;}
Project: jhipster-sample-app-gradle File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();ApiInfo apiInfo = new ApiInfo(
- jHipsterProperties.getSwagger().getTitle(),
- jHipsterProperties.getSwagger().getDescription(),
- jHipsterProperties.getSwagger().getVersion(),
- jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
- jHipsterProperties.getSwagger().getContact(),
- jHipsterProperties.getSwagger().getLicense(),
- jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: menuber File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket() {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: jhipster-sample-app-java7 File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();ApiInfo apiInfo = new ApiInfo(
- jHipsterProperties.getSwagger().getTitle(),
- jHipsterProperties.getSwagger().getDescription(),
- jHipsterProperties.getSwagger().getVersion(),
- jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
- jHipsterProperties.getSwagger().getContact(),
- jHipsterProperties.getSwagger().getLicense(),
- jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: bugkillers File: SpringfoxConfig2.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket swaggerSpringMvcPlugin() {// return new Docket(DocumentationType.SWAGGER_2);return new Docket(DocumentationType.SWAGGER_2)// .groupName("bugkillers").select()//Ignores controllers annotated with @CustomIgnore// .apis(not(withClassAnnotation(CustomIgnore.class)) //Selection by RequestHandler.paths(paths()) // and by paths.build().apiInfo(apiInfo()).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Project: springfox-demos File: Application.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).groupName("full-petstore-api").apiInfo(apiInfo()).select().paths(petstorePaths()).build();}
Project: flipper-reverse-image-search File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket() {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: jhipster-ionic File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket() {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: barweb File: ApiDocumentationConfig.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/api").directModelSubstitute(LocalDate.class, String.class).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())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Project: jhipster-sample-app File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();ApiInfo apiInfo = new ApiInfo(
- jHipsterProperties.getSwagger().getTitle(),
- jHipsterProperties.getSwagger().getDescription(),
- jHipsterProperties.getSwagger().getVersion(),
- jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
- jHipsterProperties.getSwagger().getContact(),
- jHipsterProperties.getSwagger().getLicense(),
- jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: availability File: SwaggerConfig.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket api() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class,String.class).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())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Project: jhipster-sample-app-mongodb File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();ApiInfo apiInfo = new ApiInfo(
- jHipsterProperties.getSwagger().getTitle(),
- jHipsterProperties.getSwagger().getDescription(),
- jHipsterProperties.getSwagger().getVersion(),
- jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
- jHipsterProperties.getSwagger().getContact(),
- jHipsterProperties.getSwagger().getLicense(),
- jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: spring-swagger2markup-demo File: SwaggerConfig.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket restApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().paths(Predicates.and(ant("/**"), Predicates.not(ant("/error")))).build();}
Project: cqrs-axon File: Swagger2Configuration.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class, String.class).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())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Project: fullstop File: SwaggerConfig.java View source code | 6 votes | ![]() ![]() |
- @Beanpublic Docket customImplementation() {return new Docket(DocumentationType.SWAGGER_2) //.apiInfo(apiInfo()) //.select() //.paths(fullstopOnlyEndpoints()) //.build();}
Project: jhipster-sample-app-elasticsearch File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();ApiInfo apiInfo = new ApiInfo(
- jHipsterProperties.getSwagger().getTitle(),
- jHipsterProperties.getSwagger().getDescription(),
- jHipsterProperties.getSwagger().getVersion(),
- jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
- jHipsterProperties.getSwagger().getContact(),
- jHipsterProperties.getSwagger().getLicense(),
- jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: JTL-FIleService File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket() {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: ABC-Go File: SwaggerConfiguration.java View source code | 6 votes | ![]() ![]() |
- /**
- * Swagger Springfox configuration.
- */@Beanpublic Docket swaggerSpringfoxDocket() {
- log.debug("Starting Swagger");StopWatch watch = new StopWatch();
- watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
- watch.stop();
- log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
springfox.documentation.spi.DocumentationType配置示例的更多相关文章
- springfox.documentation.service.ApiInfo配置示例
Java Code Examples for springfox.documentation.service.ApiInfo The following are top voted examples ...
- Nginx 简单的负载均衡配置示例(转载)
原文地址:Nginx 简单的负载均衡配置示例(转载) 作者:水中游于 www.s135.com 和 blog.s135.com 域名均指向 Nginx 所在的服务器IP. 用户访问http://www ...
- HBase + Kerberos 配置示例(二)
接上篇<HBase + Kerberos配置示例(一)>,我们继续剩下的配置工作. 环境准备 Hadoop配置 Zookeeper配置 HBase配置 Java测试程序 环境准备 安装ha ...
- 高通APQ8074 spi 接口配置
高通APQ8074 spi 接口配置 8074 平台含有两个BLSP(BAM Low-Speed Peripheral) , 每一个BLSP含有两个QUP, 每一个QUP可以被配置为I2C, SPI, ...
- 全互联结构DVPN综合配置示例
以下内容摘自正在全面热销的最新网络设备图书“豪华四件套”之一<H3C路由器配置与管理完全手册>(第二版)(其余三本分别是:<Cisco交换机配置与管理完全手册>(第二版).&l ...
- Haproxy的安装和配置示例
1.ha proxy简介ha proxy是一个开源的,高性能的,基于tcp第四层和http第七层应用的负载均衡软件优点:可靠性和稳定性非常好 最高可以同时维护40000-50000个 ...
- MyBatis Generator配置示例
(一).MBG介绍 MyBatis Generator(MBG)是一个Mybatis的代码生成器,它可以用来生成可以访问(多个)表的基础对象.MBG解决了对数据库操作有最大影响的一些简单的CRUD(插 ...
- haproxy反向代理配置示例
*/ .hljs { display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; } .hl ...
- java日志规约及配置示例终极总结
目录 什么是日志 常用日志框架 日志级别详解 日志的记录时机 日志使用规约 logback 配置示例 loh4j2 配置示例 什么是日志? 简单的说,日志就是记录程序的运行轨迹,方便查找关键信息,也方 ...
随机推荐
- 基础知识复习(二)——stdafx.h 头文件及x&(x-1)运算
今天好久没写过C++程序了,使用VS2013 新建空的控制台程序,结果自动生成了头文件和main 方法. 就了解了stdafx.h头文件的含义及用法. stdafx:standard Applicat ...
- python语言的优点和缺点
python作为一门高级编程语言,它的诞生虽然很偶然,但是它得到程序员的喜爱却是必然之路. 龟叔给Python的定位是"优雅"."明确"."简单&qu ...
- 69道Spring面试题和答案
1. 什么是spring? Spring 是个java企业级应用的开源开发框架.Spring主要用来开发Java应用,但是有些扩展是针对构建J2EE平台的web应用.Spring 框架目标是简化Jav ...
- POJ 3694 tarjan 桥+lca
Network Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 7298 Accepted: 2651 Descripti ...
- java中Commons-fileupload实现上传
java中Commons-fileupload组件实现上传 在实现功能之前需要导入两个jar文件,分别是 commons-fileupload-1.3.1.jar 和 commons-io.jar 文 ...
- java string.format()
String text=String.format("$%1$s 门市价:¥%2$s",18.6,22);$18.6 门市价:¥22
- iOS 图片填充 UIImageView (contentMode)
掐指算下来做iOS开发也是有两年多的时间了,然后今天一个超级常用的控件让我颜面大跌,于是我准备把自己的丢人行径公之于众.如果您看到我这篇文章时和我一样,也是刚刚知道这项功能,那么您就当收获了一个... ...
- iOS7程序内部如何打开评分页面
测试发现项目在iOS7下 无法打开评价页面,但是iOS6是正常: 查了一下发现应该是iOS7 改变链接了,有个网友给出了以下的解决办法 把旧的链接改成 appString =[NSStringstri ...
- Swift的文档注释
官方文档地址:https://developer.apple.com/library/mac/documentation/Xcode/Reference/xcode_markup_formatting ...
- Population-based metagenomics analysis reveals markers for gut microbiome composition and diversity
读paper的时候觉得自己就是个24K纯学渣(=.=)一大堆问题等着我去解决...所以在这里写一个Q&A好了,先列问题,逐步填充答案- ××××××××××××××××××我是分割线么么哒×× ...