From 902defc777bdd84680fdc5d10f3fc28a298c5c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=91=88=E7=86=B9?= Date: Wed, 9 Nov 2022 14:58:30 +0800 Subject: [PATCH 1/7] docs: improve quick start document (#213) --- docs/zh/quick-start.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/docs/zh/quick-start.md b/docs/zh/quick-start.md index c0c81078..886e9ded 100644 --- a/docs/zh/quick-start.md +++ b/docs/zh/quick-start.md @@ -22,13 +22,10 @@ public class CheckTokenFilter implements PluginFilter { } @Override - public Mono filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) { + public void filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) { /* * todo your business here */ - - - return chain.filter(request, response); } } ``` @@ -48,18 +45,17 @@ apisix-java-plugin-runner 与 APISIX 用 `Unix Domain Socket` 进行进程间通 构建完成,你会在 `dist` 目录看见构建产物 ``` -apache-apisix-java-plugin-runner-0.1.0-bin.tar.gz +apache-apisix-java-plugin-runner-${your_plugin_version}-bin.tar.gz ``` 在`dist`目录添加`Dockerfile`文件 ```dockerfile -FROM apache/apisix:${version}-alpine - -RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories && apk add --no-cache openjdk8-jre +FROM apache/apisix:${version}-debian -ADD apache-apisix-java-plugin-runner-0.1.0-bin.tar.gz /usr/local/ +RUN apt -y install openjdk-11-jdk +ADD apache-apisix-java-plugin-runner-${your_plugin_version}-SNAPSHOT-bin.tar.gz /usr/local/ ``` 然后构建容器镜像 @@ -73,11 +69,20 @@ ADD apache-apisix-java-plugin-runner-0.1.0-bin.tar.gz /usr/local/ ```yaml ext-plugin: - cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar'] + cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/usr/local/apisix-runner-bin/apisix-java-plugin-runner.jar'] ``` 构建完成的 `apache/apisix:${version}-alpine-with-java-plugin` 镜像内即包含 APISIX 与 apisix-java-plugun-runner。 +### 调试 +如果需要调试插件, 可以将上述 ext-plugin 配置中添加调试参数: +```yaml +ext-plugin: + cmd: ['java', '-jar', '-Xmx4g', '-Xms4g','-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005', '/usr/local/apisix-runner-bin/apisix-java-plugin-runner.jar'] +``` + +就可以通过 Docker 的 5005 端口远程调试插件。 + ### 使用插件 配置路由 From 2c5329995273f8c2d74c065494d47bc12f0d467b Mon Sep 17 00:00:00 2001 From: tzssangglass Date: Fri, 11 Nov 2022 10:45:23 +0800 Subject: [PATCH 2/7] feat: release 0.4.0 (#212) --- CHANGELOG.md | 10 ++++++++++ Makefile | 2 +- README.md | 1 + docs/en/latest/installation-guide.md | 2 +- pom.xml | 2 +- runner-core/pom.xml | 4 ++-- runner-dist/apisix-runner-bin-dist/pom.xml | 2 +- runner-dist/apisix-runner-src-dist/pom.xml | 2 +- runner-dist/pom.xml | 4 ++-- runner-plugin-sdk/pom.xml | 2 +- runner-plugin/pom.xml | 4 ++-- runner-starter/pom.xml | 4 ++-- sample/pom.xml | 4 ++-- 13 files changed, 27 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 941ba3b5..e2215b8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,10 +23,20 @@ title: Changelog ## Table of Contents +- [0.4.0](#040) - [0.3.0](#030) - [0.2.0](#020) - [0.1.0](#010) +## 0.4.0 + +This release mainly provides the ability to get body data from upstream. + +### Core + +- support for getting upstream response body. [200](https://github.com/apache/apisix-java-plugin-runner/pull/200) +- support watching config changes. [205](https://github.com/apache/apisix-java-plugin-runner/pull/208) + ## 0.3.0 This release mainly provides the ability to get headers from upstream, and support download the project from Maven Center. diff --git a/Makefile b/Makefile index a932f321..50b6c5a4 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ SHELL := /bin/bash -o pipefail -VERSION ?= 0.3.0 +VERSION ?= 0.4.0 RELEASE_SRC = apisix-java-plugin-runner-${VERSION}-src .PHONY: release-src diff --git a/README.md b/README.md index b680d2a9..e96e2d69 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Version Matrix | 0.1.0 | >= [2.7.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#270) | | 0.2.0 | >= [2.12.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#2102) | | 0.3.0 | >= [2.15.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#2150) | +| 0.4.0 | >= [3.0.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#300) | How it Works ------------- diff --git a/docs/en/latest/installation-guide.md b/docs/en/latest/installation-guide.md index 5a4b58ce..833afdda 100644 --- a/docs/en/latest/installation-guide.md +++ b/docs/en/latest/installation-guide.md @@ -48,7 +48,7 @@ Install org.apache.apisix apisix-runner-starter - 0.3.1-SNAPSHOT + 0.4.0 ``` diff --git a/pom.xml b/pom.xml index 0d0ca540..3495afd5 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache.apisix apisix-plugin-runner - 0.3.1-SNAPSHOT + 0.4.0 org.apache diff --git a/runner-core/pom.xml b/runner-core/pom.xml index f61a7397..ee178c5f 100644 --- a/runner-core/pom.xml +++ b/runner-core/pom.xml @@ -24,7 +24,7 @@ org.apache.apisix apisix-plugin-runner - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-core @@ -36,7 +36,7 @@ org.apache.apisix apisix-runner-plugin-sdk - 0.3.1-SNAPSHOT + 0.4.0 org.springframework.boot diff --git a/runner-dist/apisix-runner-bin-dist/pom.xml b/runner-dist/apisix-runner-bin-dist/pom.xml index 69505d21..d3930635 100644 --- a/runner-dist/apisix-runner-bin-dist/pom.xml +++ b/runner-dist/apisix-runner-bin-dist/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-runner-dist - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-bin-dist diff --git a/runner-dist/apisix-runner-src-dist/pom.xml b/runner-dist/apisix-runner-src-dist/pom.xml index a8b3ee6b..212d9cec 100644 --- a/runner-dist/apisix-runner-src-dist/pom.xml +++ b/runner-dist/apisix-runner-src-dist/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-runner-dist - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-src-dist diff --git a/runner-dist/pom.xml b/runner-dist/pom.xml index 558b3b55..1aa63b1c 100644 --- a/runner-dist/pom.xml +++ b/runner-dist/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-dist @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-starter - 0.3.1-SNAPSHOT + 0.4.0 diff --git a/runner-plugin-sdk/pom.xml b/runner-plugin-sdk/pom.xml index 065e5a72..44108d46 100644 --- a/runner-plugin-sdk/pom.xml +++ b/runner-plugin-sdk/pom.xml @@ -24,7 +24,7 @@ org.apache.apisix apisix-plugin-runner - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-plugin-sdk diff --git a/runner-plugin/pom.xml b/runner-plugin/pom.xml index 5e1b2f07..f2e2acb0 100644 --- a/runner-plugin/pom.xml +++ b/runner-plugin/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-plugin @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-plugin-sdk - 0.3.1-SNAPSHOT + 0.4.0 com.google.code.gson diff --git a/runner-starter/pom.xml b/runner-starter/pom.xml index 0526bf36..2351c3e1 100644 --- a/runner-starter/pom.xml +++ b/runner-starter/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-starter @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-core - 0.3.1-SNAPSHOT + 0.4.0 diff --git a/sample/pom.xml b/sample/pom.xml index 013de5e3..b61e2e3d 100644 --- a/sample/pom.xml +++ b/sample/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.3.1-SNAPSHOT + 0.4.0 apisix-runner-sample @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-plugin-sdk - 0.3.1-SNAPSHOT + 0.4.0 com.google.code.gson From e18da5ca41607e7a6f79b53d9c1c85f0708025f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=91=88=E7=86=B9?= Date: Mon, 14 Nov 2022 21:20:10 +0800 Subject: [PATCH 3/7] feat: add log4j2 configuration (#214) --- .gitignore | 1 + pom.xml | 5 ++ runner-core/pom.xml | 4 ++ runner-starter/src/main/resources/log4j2.xml | 59 ++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 runner-starter/src/main/resources/log4j2.xml diff --git a/.gitignore b/.gitignore index 7eb9c233..7fe89e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ target/ !**/src/main/**/target/ !**/src/test/**/target/ release/ +logs/ ### IntelliJ IDEA ### .idea diff --git a/pom.xml b/pom.xml index 3495afd5..c7a652d2 100644 --- a/pom.xml +++ b/pom.xml @@ -88,6 +88,11 @@ pom import + + com.lmax + disruptor + 3.4.4 + org.springframework.boot spring-boot-dependencies diff --git a/runner-core/pom.xml b/runner-core/pom.xml index ee178c5f..2a50d771 100644 --- a/runner-core/pom.xml +++ b/runner-core/pom.xml @@ -63,6 +63,10 @@ + + com.lmax + disruptor + io.netty netty-all diff --git a/runner-starter/src/main/resources/log4j2.xml b/runner-starter/src/main/resources/log4j2.xml new file mode 100644 index 00000000..fe2c8880 --- /dev/null +++ b/runner-starter/src/main/resources/log4j2.xml @@ -0,0 +1,59 @@ + + + + + + + debug + ${sys:user.dir} + ${sys:file.encoding} + + + + + + + + %d %-5p %-32t - %m%n %throwable + + + + + + + + + + %d %-5p %-32t - %m%n %throwable + + + + + + + + + + + + + + From cdbd81f26e693d6bef4cb7cc8c92541e049cf4b4 Mon Sep 17 00:00:00 2001 From: Junyeong Jang Date: Mon, 22 May 2023 15:32:53 +0900 Subject: [PATCH 4/7] feat: `PostResponse` supports charset other than `UTF-8` (#239) --- runner-plugin-sdk/pom.xml | 5 ++ .../apisix/plugin/runner/PostResponse.java | 10 +++- .../plugin/runner/PostResponseTest.java | 55 +++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java diff --git a/runner-plugin-sdk/pom.xml b/runner-plugin-sdk/pom.xml index 44108d46..c48418d7 100644 --- a/runner-plugin-sdk/pom.xml +++ b/runner-plugin-sdk/pom.xml @@ -60,5 +60,10 @@ + + org.springframework.boot + spring-boot-starter-test + test + diff --git a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostResponse.java b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostResponse.java index ab9d3306..127de5a0 100644 --- a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostResponse.java +++ b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostResponse.java @@ -26,6 +26,7 @@ import org.springframework.util.StringUtils; import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; @@ -43,8 +44,11 @@ public class PostResponse implements A6Response { private Map headers; + private Charset charset; + public PostResponse(long requestId) { this.requestId = requestId; + this.charset = StandardCharsets.UTF_8; } @Override @@ -53,7 +57,7 @@ public ByteBuffer encode() { int bodyIndex = -1; if (StringUtils.hasText(body)) { - byte[] bodyBytes = body.getBytes(StandardCharsets.UTF_8); + byte[] bodyBytes = body.getBytes(this.charset); bodyIndex = Resp.createBodyVector(builder, bodyBytes); } @@ -122,4 +126,8 @@ public void setBody(String body) { public void setStatusCode(int statusCode) { this.statusCode = statusCode; } + + public void setCharset(Charset charset) { + this.charset = charset; + } } diff --git a/runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java b/runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java new file mode 100644 index 00000000..512aca96 --- /dev/null +++ b/runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java @@ -0,0 +1,55 @@ +package org.apache.apisix.plugin.runner; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +class PostResponseTest { + + @Test + @DisplayName("test encode with set charset") + void testEncodeWithSetCharset() { + long requestId = 1L; + String body = "dummy body"; + Charset charset = StandardCharsets.UTF_16; + + PostResponse postResponse = new PostResponse(requestId); + postResponse.setBody(body); + postResponse.setCharset(charset); + + ByteBuffer encoded = postResponse.encode(); + + assertTrue(Collections.indexOfSubList(byteArrayToList(encoded.array()), byteArrayToList(body.getBytes(charset))) >= 0); + } + + @Test + @DisplayName("test encode without set charset") + void testEncodeWithoutSetCharset() { + long requestId = 1L; + String body = "dummy body"; + Charset charset = StandardCharsets.UTF_8; + + PostResponse postResponse = new PostResponse(requestId); + postResponse.setBody(body); + + ByteBuffer encoded = postResponse.encode(); + + assertTrue(Collections.indexOfSubList(byteArrayToList(encoded.array()), byteArrayToList(body.getBytes(charset))) >= 0); + } + + private List byteArrayToList(byte[] array) { + List list = new ArrayList<>(); + for (byte b : array) { + list.add(b); + } + return list; + } +} From 25512a23591fb6db7a7cce5937589791df6ca05c Mon Sep 17 00:00:00 2001 From: Gallardot Date: Mon, 22 May 2023 14:33:41 +0800 Subject: [PATCH 5/7] chore: update CI runs on ubuntu-latest (#242) --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c2132b15..0b1394ba 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ on: jobs: CI: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest timeout-minutes: 180 strategy: fail-fast: true From 8afa49e541b774c8e53917aa6d1d83eea6492eef Mon Sep 17 00:00:00 2001 From: Junyeong Jang Date: Fri, 2 Jun 2023 09:37:31 +0900 Subject: [PATCH 6/7] bug: `ExtraInfoResponse` class `getResult` method bug (#244) --- .../plugin/runner/handler/RpcCallHandler.java | 4 ++-- .../apisix/plugin/runner/ExtraInfoResponse.java | 8 ++++---- .../apisix/plugin/runner/HttpRequest.java | 13 +++++++++++-- .../apisix/plugin/runner/PostRequest.java | 13 +++++++++++-- .../apisix/plugin/runner/PostResponseTest.java | 17 +++++++++++++++++ 5 files changed, 45 insertions(+), 10 deletions(-) diff --git a/runner-core/src/main/java/org/apache/apisix/plugin/runner/handler/RpcCallHandler.java b/runner-core/src/main/java/org/apache/apisix/plugin/runner/handler/RpcCallHandler.java index ed5ff040..f054ccfe 100644 --- a/runner-core/src/main/java/org/apache/apisix/plugin/runner/handler/RpcCallHandler.java +++ b/runner-core/src/main/java/org/apache/apisix/plugin/runner/handler/RpcCallHandler.java @@ -215,7 +215,7 @@ private void doPostFilter(ChannelHandlerContext ctx) { } private void handleExtraInfo(ChannelHandlerContext ctx, ExtraInfoResponse request) { - String result = request.getResult(); + byte[] result = request.getResult(); String varsKey = queue.poll(); if (Objects.isNull(varsKey)) { logger.error("queue is empty"); @@ -233,7 +233,7 @@ private void handleExtraInfo(ChannelHandlerContext ctx, ExtraInfoResponse reques } } else { - nginxVars.put(varsKey, result); + nginxVars.put(varsKey, new String(result)); } if (queue.isEmpty()) { diff --git a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/ExtraInfoResponse.java b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/ExtraInfoResponse.java index eb10f975..7839afb1 100644 --- a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/ExtraInfoResponse.java +++ b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/ExtraInfoResponse.java @@ -35,12 +35,12 @@ public static ExtraInfoResponse from(ByteBuffer buffer) { return new ExtraInfoResponse(req); } - public String getResult() { - StringBuilder builder = new StringBuilder(); + public byte[] getResult() { + byte[] byteArray = new byte[this.resp.resultLength()]; for (int i = 0; i < this.resp.resultLength(); i++) { - builder.append((char) this.resp.result(i)); + byteArray[i] = (byte) this.resp.result(i); } - return builder.toString(); + return byteArray; } @Override diff --git a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/HttpRequest.java b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/HttpRequest.java index 896a9118..2efede05 100644 --- a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/HttpRequest.java +++ b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/HttpRequest.java @@ -24,6 +24,7 @@ import org.springframework.util.StringUtils; import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -50,7 +51,7 @@ public class HttpRequest implements A6Request { private Map vars; - private String body; + private byte[] body; public HttpRequest(Req req) { this.req = req; @@ -300,10 +301,18 @@ public void setVars(Map vars) { } public String getBody() { - return body; + return new String(body); + } + + public String getBody(Charset charset) { + return new String(body, charset); } public void setBody(String body) { + this.body = body.getBytes(); + } + + public void setBody(byte[] body) { this.body = body; } diff --git a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostRequest.java b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostRequest.java index ba4179ad..88315f59 100644 --- a/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostRequest.java +++ b/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/PostRequest.java @@ -23,6 +23,7 @@ import org.springframework.util.CollectionUtils; import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -38,7 +39,7 @@ public class PostRequest implements A6Request { private Integer status; - private String body; + private byte[] body; private Map vars; @@ -94,11 +95,19 @@ public Integer getUpstreamStatusCode() { } public void setBody(String body) { + this.body = body.getBytes(); + } + + public void setBody(byte[] body) { this.body = body; } public String getBody() { - return body; + return new String(body); + } + + public String getBody(Charset charset) { + return new String(body, charset); } public String getVars(String key) { diff --git a/runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java b/runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java index 512aca96..1c8a4de8 100644 --- a/runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java +++ b/runner-plugin-sdk/src/test/java/org/apache/apisix/plugin/runner/PostResponseTest.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.apisix.plugin.runner; import org.junit.jupiter.api.DisplayName; From fc7512ac66e27e169701c020a31d102329d26915 Mon Sep 17 00:00:00 2001 From: Junyeong Jang Date: Fri, 19 Jan 2024 15:52:21 +0900 Subject: [PATCH 7/7] feat: release 0.5.0 (#299) --- CHANGELOG.md | 23 ++++++++++++++++++---- Makefile | 2 +- README.md | 1 + docs/en/latest/installation-guide.md | 2 +- pom.xml | 2 +- runner-core/pom.xml | 4 ++-- runner-dist/apisix-runner-bin-dist/pom.xml | 2 +- runner-dist/apisix-runner-src-dist/pom.xml | 2 +- runner-dist/pom.xml | 4 ++-- runner-plugin-sdk/pom.xml | 2 +- runner-plugin/pom.xml | 4 ++-- runner-starter/pom.xml | 4 ++-- sample/pom.xml | 4 ++-- 13 files changed, 36 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2215b8a..5b29e0c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,10 +23,25 @@ title: Changelog ## Table of Contents -- [0.4.0](#040) -- [0.3.0](#030) -- [0.2.0](#020) -- [0.1.0](#010) +- [0.5.0](#032) +- [0.4.0](#046) +- [0.3.0](#055) +- [0.2.0](#068) +- [0.1.0](#096) + +## 0.5.0 + +This release mainly improves log4j configuration and CI, provides other encoding support and bug fixes. + +### Core + +- add log4j2 configuration. [214](https://github.com/apache/apisix-java-plugin-runner/pull/214) +- `PostResponse` supports charset other than `UTF-8`. [239](https://github.com/apache/apisix-java-plugin-runner/pull/239) +- update CI runs on ubuntu-latest. [242](https://github.com/apache/apisix-java-plugin-runner/pull/242) + +### Bugfix + +- fix `ExtraInfoResponse` class `getResult` method bug. [244](https://github.com/apache/apisix-java-plugin-runner/pull/244) ## 0.4.0 diff --git a/Makefile b/Makefile index 50b6c5a4..8542faa2 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ SHELL := /bin/bash -o pipefail -VERSION ?= 0.4.0 +VERSION ?= 0.5.0 RELEASE_SRC = apisix-java-plugin-runner-${VERSION}-src .PHONY: release-src diff --git a/README.md b/README.md index e96e2d69..9e687fb3 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Version Matrix | 0.2.0 | >= [2.12.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#2102) | | 0.3.0 | >= [2.15.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#2150) | | 0.4.0 | >= [3.0.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#300) | +| 0.5.0 | >= [3.0.0](https://github.com/apache/apisix/blob/master/CHANGELOG.md#300) | How it Works ------------- diff --git a/docs/en/latest/installation-guide.md b/docs/en/latest/installation-guide.md index 833afdda..1d656056 100644 --- a/docs/en/latest/installation-guide.md +++ b/docs/en/latest/installation-guide.md @@ -48,7 +48,7 @@ Install org.apache.apisix apisix-runner-starter - 0.4.0 + 0.5.0 ``` diff --git a/pom.xml b/pom.xml index c7a652d2..e3e7a474 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache.apisix apisix-plugin-runner - 0.4.0 + 0.5.0 org.apache diff --git a/runner-core/pom.xml b/runner-core/pom.xml index 2a50d771..81e0dc0c 100644 --- a/runner-core/pom.xml +++ b/runner-core/pom.xml @@ -24,7 +24,7 @@ org.apache.apisix apisix-plugin-runner - 0.4.0 + 0.5.0 apisix-runner-core @@ -36,7 +36,7 @@ org.apache.apisix apisix-runner-plugin-sdk - 0.4.0 + 0.5.0 org.springframework.boot diff --git a/runner-dist/apisix-runner-bin-dist/pom.xml b/runner-dist/apisix-runner-bin-dist/pom.xml index d3930635..6cc2e349 100644 --- a/runner-dist/apisix-runner-bin-dist/pom.xml +++ b/runner-dist/apisix-runner-bin-dist/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-runner-dist - 0.4.0 + 0.5.0 apisix-runner-bin-dist diff --git a/runner-dist/apisix-runner-src-dist/pom.xml b/runner-dist/apisix-runner-src-dist/pom.xml index 212d9cec..cf53548c 100644 --- a/runner-dist/apisix-runner-src-dist/pom.xml +++ b/runner-dist/apisix-runner-src-dist/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-runner-dist - 0.4.0 + 0.5.0 apisix-runner-src-dist diff --git a/runner-dist/pom.xml b/runner-dist/pom.xml index 1aa63b1c..40acab4d 100644 --- a/runner-dist/pom.xml +++ b/runner-dist/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.4.0 + 0.5.0 apisix-runner-dist @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-starter - 0.4.0 + 0.5.0 diff --git a/runner-plugin-sdk/pom.xml b/runner-plugin-sdk/pom.xml index c48418d7..2ba9f77c 100644 --- a/runner-plugin-sdk/pom.xml +++ b/runner-plugin-sdk/pom.xml @@ -24,7 +24,7 @@ org.apache.apisix apisix-plugin-runner - 0.4.0 + 0.5.0 apisix-runner-plugin-sdk diff --git a/runner-plugin/pom.xml b/runner-plugin/pom.xml index f2e2acb0..cabee963 100644 --- a/runner-plugin/pom.xml +++ b/runner-plugin/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.4.0 + 0.5.0 apisix-runner-plugin @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-plugin-sdk - 0.4.0 + 0.5.0 com.google.code.gson diff --git a/runner-starter/pom.xml b/runner-starter/pom.xml index 2351c3e1..d6bda089 100644 --- a/runner-starter/pom.xml +++ b/runner-starter/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.4.0 + 0.5.0 apisix-runner-starter @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-core - 0.4.0 + 0.5.0 diff --git a/sample/pom.xml b/sample/pom.xml index b61e2e3d..7489b74a 100644 --- a/sample/pom.xml +++ b/sample/pom.xml @@ -23,7 +23,7 @@ org.apache.apisix apisix-plugin-runner - 0.4.0 + 0.5.0 apisix-runner-sample @@ -35,7 +35,7 @@ org.apache.apisix apisix-runner-plugin-sdk - 0.4.0 + 0.5.0 com.google.code.gson