This commit is contained in:
淋雨一直走YH
2023-09-28 15:38:29 +08:00
commit 7bc57c75dc
1480 changed files with 144393 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>mjkf.xinke</groupId>
<artifactId>mjkf-xinke-plugin</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>mjkf-xinke-plugin-exm</artifactId>
<packaging>jar</packaging>
<description>功能案例插件</description>
<dependencies>
<!-- 每个插件都要引入自己的对外接口 -->
<dependency>
<groupId>mjkf.xinke</groupId>
<artifactId>mjkf-xinke-plugin-exm-api</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,56 @@
package mjkf.xinke.exm.core.config;
import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
import io.swagger.annotations.ApiOperation;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMethod;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import mjkf.xinke.common.pojo.CommonResult;
import javax.annotation.Resource;
/**
* 功能案例相关配置
*
*
* @date 2022/7/7 16:18
**/
@Configuration
public class ExmConfigure {
@Resource
private OpenApiExtensionResolver openApiExtensionResolver;
/**
* API文档分组配置
*
*
* @date 2022/7/7 16:18
**/
@Bean(value = "exmDocApi")
public Docket exmDocApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(new ApiInfoBuilder()
.title("功能案例EXM")
.description("功能案例EXM")
.termsOfServiceUrl("https://www.xiaonuo.vip")
.contact(new Contact("SNOWY_TEAM","https://www.xiaonuo.vip", "xuyuxiang29@foxmail.com"))
.version("2.0.0")
.build())
.globalResponseMessage(RequestMethod.GET, CommonResult.responseList())
.globalResponseMessage(RequestMethod.POST, CommonResult.responseList())
.groupName("功能案例EXM")
.select()
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.apis(RequestHandlerSelectors.basePackage("mjkf.xinke.exm"))
.paths(PathSelectors.any())
.build();
}
}

View File

@@ -0,0 +1,2 @@
package mjkf.xinke.exm;