-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request !47 from 萧明/dev
- Loading branch information
Showing
885 changed files
with
14,817 additions
and
3,130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
<?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> | ||
|
||
<groupId>com.github.xiaoymin</groupId> | ||
<artifactId>knife4j-aggregation-desktop</artifactId> | ||
<version>1.0</version> | ||
<description>Knife4jAggregationDesktop项目是独立的聚合平台,可以动态无线聚合</description> | ||
<developers> | ||
<developer> | ||
<id>xiaoym</id> | ||
<name>肖玉民</name> | ||
<email>xiaoymin@foxmail.com</email> | ||
<roles> | ||
<role>Java Development Engineer</role> | ||
</roles> | ||
<timezone>2020年12月4日 20:25:13</timezone> | ||
</developer> | ||
</developers> | ||
<licenses> | ||
<license> | ||
<name>The Apache Software License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
</license> | ||
</licenses> | ||
<scm> | ||
<connection>scm:git@gitee.com:xiaoym/knife4j.git</connection> | ||
<developerConnection>scm:git@gitee.com:xiaoym/knife4j.git</developerConnection> | ||
<url>git@gitee.com:xiaoym/knife4j.git</url> | ||
</scm> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
<skipTests>true</skipTests> | ||
<slf4j.version>1.7.28</slf4j.version> | ||
<hutool.version>5.4.1</hutool.version> | ||
<httpclient.version>4.5.12</httpclient.version> | ||
<gson.version>2.8.6</gson.version> | ||
<logback.version>1.2.3</logback.version> | ||
</properties> | ||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-properties</artifactId> | ||
<version>2.11.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>2.8.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.yaml</groupId> | ||
<artifactId>snakeyaml</artifactId> | ||
<version>1.27</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all --> | ||
<dependency> | ||
<groupId>cn.hutool</groupId> | ||
<artifactId>hutool-all</artifactId> | ||
<version>${hutool.version}</version> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api --> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>${logback.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-core</artifactId> | ||
<version>${logback.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-access</artifactId> | ||
<version>${logback.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>${httpclient.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>${gson.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.undertow</groupId> | ||
<artifactId>undertow-servlet</artifactId> | ||
<version>2.2.2.Final</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.jboss.spec.javax.servlet</groupId> | ||
<artifactId>jboss-servlet-api_4.0_spec</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.jboss.spec.javax.annotation</groupId> | ||
<artifactId>jboss-annotations-api_1.3_spec</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<!--maven 指定jdk版本 --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.18.1</version> | ||
<configuration> | ||
<skipTests>${skipTests}</skipTests> | ||
<argLine>-Dfile.encoding=UTF-8</argLine> | ||
</configuration> | ||
</plugin> | ||
<!--构建Knife4jAggregationDesktop--> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.2.0</version> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<classpathPrefix>../lib/</classpathPrefix> | ||
<Main-Class>com.github.xiaoymin.knife4j.Knife4jAggregationDesktop</Main-Class> | ||
</manifest> | ||
<manifestEntries> | ||
<name>Knife4jAggregationDesktop</name> | ||
<author>xiaoymin@foxmail.com</author> | ||
<url>https://gitee.com/xiaoym/knife4j</url> | ||
</manifestEntries> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>3.1.2</version> | ||
<executions> | ||
<execution> | ||
<id>copy-dependencies</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/lib</outputDirectory> | ||
<overWriteReleases>false</overWriteReleases> | ||
<overWriteSnapshots>false</overWriteSnapshots> | ||
<overWriteIfNewer>true</overWriteIfNewer> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
</project> |
30 changes: 30 additions & 0 deletions
30
...regation-desktop/src/main/java/com/github/xiaoymin/knife4j/Knife4jAggregationDesktop.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD. | ||
* All rights reserved. | ||
* Official Web Site: http://www.xiaominfo.com. | ||
* Developer Web Site: http://open.xiaominfo.com. | ||
*/ | ||
|
||
package com.github.xiaoymin.knife4j; | ||
|
||
import com.github.xiaoymin.knife4j.core.AggregationDesktopBuilder; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
|
||
/** | ||
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a> | ||
* 2020/12/04 20:28 | ||
* @since:knife4j-aggregation-desktop 1.0 | ||
*/ | ||
public class Knife4jAggregationDesktop { | ||
|
||
static Logger logger= LoggerFactory.getLogger(Knife4jAggregationDesktop.class); | ||
|
||
public static void main(String[] args) { | ||
//dev | ||
new AggregationDesktopBuilder("F:\\开发项目\\开源中国\\knife4j\\Knife4j-Aggregation\\软件目录").start(); | ||
//prod | ||
//new AggregationDesktopBuilder().start(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...aggregation-desktop/src/main/java/com/github/xiaoymin/knife4j/aggre/cloud/CloudRoute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD. | ||
* All rights reserved. | ||
* Official Web Site: http://www.xiaominfo.com. | ||
* Developer Web Site: http://open.xiaominfo.com. | ||
*/ | ||
|
||
package com.github.xiaoymin.knife4j.aggre.cloud; | ||
|
||
import com.github.xiaoymin.knife4j.aggre.core.pojo.CommonAuthRoute; | ||
|
||
/** | ||
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a> | ||
* 2020/11/13 13:14 | ||
* @since:knife4j-aggregation-spring-boot-starter 2.0.8 | ||
*/ | ||
public class CloudRoute extends CommonAuthRoute { | ||
|
||
/** | ||
* 地址,例如:http://192.179.0.1:8999 | ||
*/ | ||
private String uri; | ||
|
||
public String getUri() { | ||
return uri; | ||
} | ||
|
||
public void setUri(String uri) { | ||
this.uri = uri; | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...-aggregation-desktop/src/main/java/com/github/xiaoymin/knife4j/aggre/core/RouteCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD. | ||
* All rights reserved. | ||
* Official Web Site: http://www.xiaominfo.com. | ||
* Developer Web Site: http://open.xiaominfo.com. | ||
*/ | ||
|
||
package com.github.xiaoymin.knife4j.aggre.core; | ||
|
||
/*** | ||
* | ||
* @since:knife4j-aggregation-spring-boot-starter 2.0.8 | ||
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a> | ||
* 2020/10/31 10:56 | ||
*/ | ||
public interface RouteCache<K,V> { | ||
|
||
/** | ||
* | ||
* @param k | ||
* @param v | ||
* @return | ||
*/ | ||
boolean put(K k,V v); | ||
|
||
/** | ||
* 获取缓存值 | ||
* @param k | ||
* @return | ||
*/ | ||
V get(K k); | ||
|
||
/** | ||
* 移除缓存 | ||
* @param k | ||
* @return | ||
*/ | ||
boolean remove(K k); | ||
} |
24 changes: 24 additions & 0 deletions
24
...egation-desktop/src/main/java/com/github/xiaoymin/knife4j/aggre/core/RouteDispatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD. | ||
* All rights reserved. | ||
* Official Web Site: http://www.xiaominfo.com. | ||
* Developer Web Site: http://open.xiaominfo.com. | ||
*/ | ||
|
||
package com.github.xiaoymin.knife4j.aggre.core; | ||
|
||
/** | ||
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a> | ||
* 2020/12/05 10:39 | ||
* @since:knife4j-aggregation-desktop 1.0 | ||
*/ | ||
public class RouteDispatcher { | ||
/** | ||
* 请求头 | ||
*/ | ||
public static final String ROUTE_PROXY_HEADER_NAME="knfie4j-gateway-request"; | ||
public static final String ROUTE_PROXY_HEADER_BASIC_NAME="knife4j-gateway-basic-request"; | ||
public static final String OPENAPI_GROUP_ENDPOINT="/swagger-resources"; | ||
public static final String OPENAPI_GROUP_INSTANCE_ENDPOINT="/swagger-instance"; | ||
public static final String ROUTE_BASE_PATH="/"; | ||
} |
23 changes: 23 additions & 0 deletions
23
...gregation-desktop/src/main/java/com/github/xiaoymin/knife4j/aggre/core/RouteExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (C) 2018 Zhejiang xiaominfo Technology CO.,LTD. | ||
* All rights reserved. | ||
* Official Web Site: http://www.xiaominfo.com. | ||
* Developer Web Site: http://open.xiaominfo.com. | ||
*/ | ||
package com.github.xiaoymin.knife4j.aggre.core; | ||
|
||
/*** | ||
* | ||
* @since:knife4j-aggregation-spring-boot-starter 2.0.8 | ||
* @author <a href="mailto:xiaoymin@foxmail.com">xiaoymin@foxmail.com</a> | ||
* 2020/10/29 20:33 | ||
*/ | ||
public interface RouteExecutor { | ||
|
||
/** | ||
* 执行器 | ||
* @param routeContext | ||
* @return | ||
*/ | ||
RouteResponse executor(RouteRequestContext routeContext); | ||
} |
Oops, something went wrong.