1. api信息编写

      1. private ApiInfo apiInfo() {
      2. return new ApiInfo(
      3. "Spring Boot 项目集成 Swagger 实例文档",
      4. "我的博客网站:https://itweknow.cn,欢迎大家访问。",
      5. "API V1.0",
      6. "Terms of service",
      7. new Contact("名字想好没", "https://itweknow.cn", "gancy.programmer@gmail.com"),
      8. "Apache", "http://www.apache.org/", Collections.emptyList());
      9. }
    2. api设置 ```java @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .groupName(“公共管理”) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build() .apiInfo(apiInfo()); }

    ```