springfox.documentation.service.Contact类的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(8.9k)|赞(0)|评价(0)|浏览(386)

本文整理了Java中springfox.documentation.service.Contact类的一些代码示例,展示了Contact类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Contact类的具体详情如下:
包路径:springfox.documentation.service.Contact
类名称:Contact

Contact介绍

暂无

代码示例

代码示例来源:origin: wuyouzhuguli/SpringAll

private ApiInfo buildApiInf() {
    return new ApiInfoBuilder()
        .title("系统RESTful API文档")
        .contact(new Contact("mrbird", "https://mrbird.cc", "852252810@qq.com"))
        .version("1.0")
        .build();
  }
}

代码示例来源:origin: Exrick/xpay

private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
        .title("XPay Api Documentation")
        .description("XPay个人支付收款系统API接口文档")
        .termsOfServiceUrl("http://xpay.exrick.cn/")
        .contact(new Contact("Exrick", "http://blog.exrick.cn", "1012139570@qq.com"))
        .version("1.0.0")
        .build();
  }
}

代码示例来源:origin: roncoo/spring-boot-demo

private ApiInfo apiInfo() {
    return new ApiInfoBuilder()//
        .title("龙果学院")// 标题
        .description("spring boot 全集")// 描述
        .termsOfServiceUrl("http://www.roncoo.com")//
        .contact(new Contact("wujing", "http://www.roncoo.com", "297115770@qq.com"))// 联系
        //.license("Apache License Version 2.0")// 开源协议
        //.licenseUrl("https://github.com/springfox/springfox/blob/master/LICENSE")// 地址
        .version("1.0")// 版本
        .build();
  }
}

代码示例来源:origin: yu199195/hmily

private ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("hmily-admin 平台接口测试")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/hmily

ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("Springcloud分布式事务解决方案之Hmily测试体验")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/Raincat

ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("transaction-admin 平台接口测试")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/myth

private ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("myth-admin 平台接口测试")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/hmily

/**
 * Api info api info.
 *
 * @return the api info
 */
private ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("dubbo分布式事务解决方案之Hmily测试体验")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/myth

/**
 * Api info api info.
 *
 * @return the api info
 */
ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("dubbo,mq分布式事务解决方案  测试体验")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/myth

/**
 * Api info api info.
 *
 * @return the api info
 */
ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("motan框架 基于mq分布式事务解决方案  测试体验")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/Raincat

/**
 * Api info api info.
 *
 * @return the api info
 */
ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("dubbo分布式事务解决方案之二阶段提交测试体验")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/Raincat

/**
 * Api info api info.
 *
 * @return the api info
 */
ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("springcloud分布式事务解决方案之二阶段提交测试体验")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: yu199195/myth

/**
 * Api info api info.
 *
 * @return the api info
 */
ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Swagger API")
      .description("Springcloud,MQ分布式事务解决方案测试体验")
      .license("Apache 2.0")
      .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
      .termsOfServiceUrl("")
      .version(VERSION)
      .contact(new Contact("xiaoyu", "", "549477611@qq.com"))
      .build();
}

代码示例来源:origin: prontera/spring-cloud-rest-tcc

@Bean
public Docket configure(SwaggerApiInfo info, TypeResolver typeResolver) {
  return new Docket(DocumentationType.SWAGGER_2)
      .select()
      .apis(RequestHandlerSelectors.basePackage("com.github.prontera"))
      .paths(PathSelectors.any())
      .build()
      .pathMapping("/")
      .useDefaultResponseMessages(false)
      .globalResponseMessage(RequestMethod.OPTIONS, info.getStatusList())
      .apiInfo(new ApiInfo(info.getTitle(), DESCRIPTION, info.getVersion(), info.getServiceUrl(), new Contact(null, null, null), null, null))
      .alternateTypeRules(
          AlternateTypeRules.newRule(
              typeResolver.resolve(PageInfo.class, WildcardType.class),
              typeResolver.resolve(SwaggerPaginationResponse.class, WildcardType.class)),
          AlternateTypeRules.newRule(
              typeResolver.resolve(Collection.class, WildcardType.class),
              typeResolver.resolve(List.class, WildcardType.class))
      )
      //.enableUrlTemplating(true)
      .forCodeGeneration(false);
}

代码示例来源:origin: SpringForAll/spring-boot-starter-swagger

.license(swaggerProperties.getLicense())
.licenseUrl(swaggerProperties.getLicenseUrl())
.contact(new Contact(swaggerProperties.getContact().getName(),
    swaggerProperties.getContact().getUrl(),
    swaggerProperties.getContact().getEmail()))
.licenseUrl(docketInfo.getLicenseUrl().isEmpty() ? swaggerProperties.getLicenseUrl() : docketInfo.getLicenseUrl())
.contact(
    new Contact(
        docketInfo.getContact().getName().isEmpty() ? swaggerProperties.getContact().getName() : docketInfo.getContact().getName(),
        docketInfo.getContact().getUrl().isEmpty() ? swaggerProperties.getContact().getUrl() : docketInfo.getContact().getUrl(),

代码示例来源:origin: vector4wang/spring-boot-quick

private ApiInfo apiInfo() {
  return new ApiInfoBuilder().title("SpringBoot整合Swagger2") // 标题
      .description("api接口的文档整理,支持在线测试") // 描述
      .contact(new Contact("vector.wang", "http://blog.wangxc.club/", "vector4wang@qq.com"))
      .version("1.0") // 版本号
      .build();
}

代码示例来源:origin: Exrick/x-boot

private ApiInfo apiInfo() {
    return new ApiInfoBuilder()
        .title(title)
        .description(description)
        .termsOfServiceUrl(termsOfServiceUrl)
        .contact(new Contact(name, url, email))
        .version(version)
        .build();
  }
}

代码示例来源:origin: pig4cloud/pig

private ApiInfo apiInfo() {
  return new ApiInfoBuilder()
      .title("Pig Swagger API ")
      .description("https://gitee.com/log4j/pig/wikis")
      .termsOfServiceUrl("https://gitee.com/log4j/pig")
      .contact(new Contact("冷冷","https://gitee.com/log4j/pig","wangiegie@gmail.com"))
      .version("1.0")
      .build();
}

代码示例来源:origin: mrdear/JavaWEB

private ApiInfo apiInfo() {
  Contact contact = new Contact("屈定","http://mrdear.cn","niudear@foxmail.com");
  return new ApiInfoBuilder()
    .title("Spring Data Redis")
    .description("Spring Data Redis学习记录")
    .termsOfServiceUrl("http://mrdear.cn")
    .contact(contact)
    .version("1.0")
    .build();
 }
}

代码示例来源:origin: timebusker/spring-boot

private ApiInfo apiInfo() {
  Contact contact = new Contact("timebusker", "timebusker@vip.qq.com", "576697722");
  return new ApiInfoBuilder()
        .title("Spring Boot中使用Swagger2构建RESTful APIs")
        .description("更多Spring Boot相关实践请关注:https://github.com/timebusker/spring-boot")
        .termsOfServiceUrl("https://github.com/timebusker/spring-boot/tree/master/spring-boot-12-Swagger2/")
        .contact(contact)
        .version("2.0.0")
        .build();
}

相关文章