mail_yanpeng@163.com
4 years ago
4 changed files with 52 additions and 52 deletions
@ -1,38 +1,37 @@ |
|||
//package com.aiprose.mbp.conf;
|
|||
//
|
|||
//import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
|||
//import org.springframework.context.annotation.Bean;
|
|||
//import org.springframework.context.annotation.Configuration;
|
|||
//import org.springframework.context.annotation.Import;
|
|||
//import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
|
|||
//import springfox.documentation.builders.ApiInfoBuilder;
|
|||
//import springfox.documentation.builders.PathSelectors;
|
|||
//import springfox.documentation.builders.RequestHandlerSelectors;
|
|||
//import springfox.documentation.service.ApiInfo;
|
|||
//import springfox.documentation.spi.DocumentationType;
|
|||
//import springfox.documentation.spring.web.plugins.Docket;
|
|||
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||
//
|
|||
//@Configuration
|
|||
//@EnableSwagger2
|
|||
//@EnableKnife4j
|
|||
//@Import(BeanValidatorPluginsConfiguration.class)
|
|||
//public class SwaggerConfiguration {
|
|||
// @Bean
|
|||
// public Docket createRestApi() {
|
|||
// return new Docket(DocumentationType.SWAGGER_2)
|
|||
// .apiInfo(apiInfo())
|
|||
// .select()
|
|||
// .apis(RequestHandlerSelectors.basePackage("com.aiprose.mbp.controller"))
|
|||
// .paths(PathSelectors.any())
|
|||
// .build();
|
|||
// }
|
|||
//
|
|||
// private ApiInfo apiInfo() {
|
|||
// return new ApiInfoBuilder()
|
|||
// .title("swagger-bootstrap-ui RESTful APIs")
|
|||
// .description("swagger-bootstrap-ui")
|
|||
// .version("1.0")
|
|||
// .build();
|
|||
// }
|
|||
//}
|
|||
package com.aiprose.mbp.conf; |
|||
|
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.context.annotation.Import; |
|||
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration; |
|||
import springfox.documentation.builders.ApiInfoBuilder; |
|||
import springfox.documentation.builders.PathSelectors; |
|||
import springfox.documentation.builders.RequestHandlerSelectors; |
|||
import springfox.documentation.service.ApiInfo; |
|||
import springfox.documentation.service.Contact; |
|||
import springfox.documentation.spi.DocumentationType; |
|||
import springfox.documentation.spring.web.plugins.Docket; |
|||
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
|||
|
|||
@Configuration |
|||
@Import(BeanValidatorPluginsConfiguration.class) |
|||
public class SwaggerConfiguration { |
|||
@Bean |
|||
public Docket createRestApi() { |
|||
return new Docket(DocumentationType.SWAGGER_2) |
|||
.apiInfo(apiInfo()) |
|||
.select() |
|||
.apis(RequestHandlerSelectors.basePackage("com.aiprose.mbp.controller")) |
|||
.paths(PathSelectors.any()) |
|||
.build(); |
|||
} |
|||
|
|||
private ApiInfo apiInfo() { |
|||
return new ApiInfoBuilder() |
|||
.title("springboot mybatis plus框架demo") |
|||
.description("springboot mybatis plus框架demo") |
|||
.contact(new Contact("nelson", "https://www.aiprose.com/", "mail_yanpeng@163.com")) |
|||
.version("1.0") |
|||
.build(); |
|||
} |
|||
} |
Loading…
Reference in new issue