From 07d57735b9f5efeabbdbbd11dff4e63cf0a90d17 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Thu, 9 May 2024 21:32:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E6=A0=B7=E4=BE=8B?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=20(#165)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: optimize the discovery inject logic and fix nacos config not working issue * feat: 删除无用的导入 * feat: 增加actuator到demo中 * fix: add lossless healthcheck for example * fix: add configuration comments * fix: 修复事件日志不输出的问题 * release: release version to 1.7.0-RC1 * feat: new add java agent for hoxton * feat: support service registry and config * feat: refrator all inject logics into BeanInjector * feat: add gray release example & dispatch bean register into plugins * feat: add environment parameter to obtain the configuration * feat: 增加元数据传输相关拦截器 * feat: 调整example打包脚本 * fix: 修复脚本没法跳转的问题 * fix: 修正样例的配置文件 --- .../src/main/resources/application.properties | 12 +++++++ .../src/main/resources/application.yaml | 27 -------------- .../src/main/resources/application.properties | 11 ++++++ .../src/main/resources/application.yaml | 30 ---------------- .../src/main/resources/application.properties | 11 ++++++ .../src/main/resources/application.yaml | 30 ---------------- .../src/main/resources/application.properties | 10 ++++++ .../src/main/resources/application.yaml | 36 ------------------- 8 files changed, 44 insertions(+), 123 deletions(-) create mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.properties delete mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.yaml create mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.properties delete mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.yaml create mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.properties delete mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.yaml create mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.properties delete mode 100644 polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.yaml diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.properties b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.properties new file mode 100644 index 00000000..cb4b9c0d --- /dev/null +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.properties @@ -0,0 +1,12 @@ +server.port=65203 + +spring.application.name=service-a-hoxton +spring.cloud.nacos.discovery.enabled=false +spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 +spring.cloud.nacos.config.enabled=false +spring.cloud.nacos.config.serverAddr=127.0.0.1:8848 +spring.cloud.nacos.username='nacos' +spring.cloud.nacos.password='nacos' +management.endpoint.health.show-details=always +management.endpoints.web.exposure.include='*' +feign.hystrix.enabled=true \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.yaml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.yaml deleted file mode 100644 index 1774d42b..00000000 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-a/src/main/resources/application.yaml +++ /dev/null @@ -1,27 +0,0 @@ -server: - port: 65203 - -spring: - application: - name: service-a-hoxton - cloud: - nacos: - discovery: - enabled: false - server-addr: 127.0.0.1:8848 - config: - enabled: false - serverAddr: 127.0.0.1:8848 - username: 'nacos' - password: 'nacos' -management: - endpoint: - health: - show-details: always - endpoints: - web: - exposure: - include: '*' -logging: - level: - com.alibaba.cloud.nacos.configdata: debug \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.properties b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.properties new file mode 100644 index 00000000..c9affe8c --- /dev/null +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.properties @@ -0,0 +1,11 @@ +server.port=65202 + +spring.application.name=service-b-hoxton +spring.cloud.nacos.discovery.enabled=false +spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 +spring.cloud.nacos.config.enabled=false +spring.cloud.nacos.config.serverAddr=127.0.0.1:8848 +spring.cloud.nacos.username='nacos' +spring.cloud.nacos.password='nacos' +management.endpoint.health.show-details=always +management.endpoints.web.exposure.include='*' \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.yaml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.yaml deleted file mode 100644 index e24c672f..00000000 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-b/src/main/resources/application.yaml +++ /dev/null @@ -1,30 +0,0 @@ -server: - port: 65202 - -spring: - application: - name: service-b-hoxton - cloud: - nacos: - discovery: - enabled: false - server-addr: 127.0.0.1:8848 - config: - enabled: false - serverAddr: 127.0.0.1:8848 - username: 'nacos' - password: 'nacos' - config: - import: - - nacos:service-b-hoxton.properties?refreshEnabled=true -management: - endpoint: - health: - show-details: always - endpoints: - web: - exposure: - include: '*' -logging: - level: - com.alibaba.cloud.nacos.configdata: debug \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.properties b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.properties new file mode 100644 index 00000000..e7bd9c13 --- /dev/null +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.properties @@ -0,0 +1,11 @@ +server.port=65201 + +spring.application.name=service-c-hoxton +spring.cloud.nacos.discovery.enabled=false +spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 +spring.cloud.nacos.config.enabled=false +spring.cloud.nacos.config.serverAddr=127.0.0.1:8848 +spring.cloud.nacos.username='nacos' +spring.cloud.nacos.password='nacos' +management.endpoint.health.show-details=always +management.endpoints.web.exposure.include='*' \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.yaml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.yaml deleted file mode 100644 index 474f01fa..00000000 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-c/src/main/resources/application.yaml +++ /dev/null @@ -1,30 +0,0 @@ -server: - port: 65201 - -spring: - application: - name: service-c-hoxton - cloud: - nacos: - discovery: - enabled: false - server-addr: 127.0.0.1:8848 - config: - enabled: false - serverAddr: 127.0.0.1:8848 - username: 'nacos' - password: 'nacos' - config: - import: - - nacos:service-c-hoxton.properties?refreshEnabled=true -management: - endpoint: - health: - show-details: always - endpoints: - web: - exposure: - include: '*' -logging: - level: - com.alibaba.cloud.nacos.configdata: debug \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.properties b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.properties new file mode 100644 index 00000000..9bb519a1 --- /dev/null +++ b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.properties @@ -0,0 +1,10 @@ +server.port=65200 + +spring.application.name=sc-gateway-hoxton +spring.cloud.nacos.discovery.enabled=false +spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848 +spring.cloud.nacos.config.enabled=false +spring.cloud.nacos.config.serverAddr=127.0.0.1:8848 +spring.cloud.nacos.username='nacos' +spring.cloud.nacos.password='nacos' +spring.cloud.gateway.discovery.locator.enabled=true \ No newline at end of file diff --git a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.yaml b/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.yaml deleted file mode 100644 index 13b92656..00000000 --- a/polaris-agent-examples/spring-cloud-plugins-examples/spring-cloud-hoxton-examples/gray-release-examples/service-gateway/src/main/resources/application.yaml +++ /dev/null @@ -1,36 +0,0 @@ -server: - port: 65200 - -spring: - application: - name: sc-gateway-hoxton - cloud: - gateway: - discovery: - locator: - enabled: true - nacos: - username: 'nacos' - password: 'nacos' - discovery: - enabled: false - server-addr: 127.0.0.1:8848 - config: - enabled: false - serverAddr: 127.0.0.1:8848 - username: 'nacos' - password: 'nacos' - config: - import: - - nacos:sc-gateway-hoxton.properties?refreshEnabled=true -management: - endpoint: - health: - show-details: always - endpoints: - web: - exposure: - include: '*' -logging: - level: - com.alibaba.cloud.nacos.configdata: debug \ No newline at end of file