parent
7dbac05b80
commit
ef2ff09044
@ -1,39 +0,0 @@
|
||||
package com.charge.station.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* @author hzh
|
||||
* @date 2023/5/23
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class Knife4jConfiguration {
|
||||
|
||||
@Bean(value = "subsidyInformation")
|
||||
public Docket subsidyInformation() {
|
||||
Docket docket=new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(new ApiInfoBuilder()
|
||||
//.title("swagger-bootstrap-ui-demo RESTful APIs")
|
||||
.description("# 补贴信息 APIs")
|
||||
.termsOfServiceUrl("http://i100c.3322.org//")
|
||||
.version("1.0")
|
||||
.build())
|
||||
//分组名称
|
||||
.groupName("补贴信息")
|
||||
.select()
|
||||
//这里指定Controller扫描包路径
|
||||
.apis(RequestHandlerSelectors.basePackage("com.charge.station.controller"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
return docket;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue