Skip to content

Commit

Permalink
fix: 修复无法javaagent无法获取用户的spring.application.name的问题 (#182)
Browse files Browse the repository at this point in the history
* 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: 修正样例的配置文件

* fix: 修复熔断无法加载的问题

* fix: 更新北极星的版本号依赖

* fix: 调整版本依赖

* feat:对齐deployment与application中的服务名定义

* feat: optimize default-plugin.conf to load once per lifecyle

* feat: 优化日志打印,增加polarisLoggingApplicationListener的配置

* fix: 修复启动脚本配置项错误问题

* fix: 修复无法javaagent无法获取用户的spring.application.name的问题
  • Loading branch information
andrewshan authored May 14, 2024
1 parent 9affe8f commit bc2ba6f
Show file tree
Hide file tree
Showing 25 changed files with 418 additions and 150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
server.port=65203

spring.application.name=service-a-hoxton
spring.cloud.nacos.discovery.enabled=false
spring.cloud.nacos.discovery.enabled=true
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
server.port=65202

spring.application.name=service-b-hoxton
spring.cloud.nacos.discovery.enabled=false
spring.cloud.nacos.discovery.enabled=true
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.enabled=false
spring.cloud.nacos.config.enabled=true
spring.cloud.nacos.config.serverAddr=127.0.0.1:8848
spring.cloud.nacos.username='nacos'
spring.cloud.nacos.password='nacos'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
server.port=65201

spring.application.name=service-c-hoxton
spring.cloud.nacos.discovery.enabled=false
spring.cloud.nacos.discovery.enabled=true
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='*'
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
spring.application.name=service-c-hoxton
spring.cloud.nacos.config.server-addr=127.0.0.1:8848

#nacos certification information
spring.cloud.nacos.username=nacos
spring.cloud.nacos.password=nacos

## nacos-namespace cannot user 'public',cause by 'public' has special handing inside.
#spring.cloud.nacos.config.namespace=public

## you can specify a custom name if you don't want to use the application name.
#spring.cloud.nacos.config.name=test-aaa
#spring.cloud.nacos.config.file-extension=yaml

## not recommended.
#spring.cloud.nacos.config.refreshable-dataids=common.properties
## not recommended.
#spring.cloud.nacos.config.shared-data-ids=common.properties,base-common.properties

## recommended.
spring.cloud.nacos.config.shared-configs[0].data-id=data-source.yaml
spring.cloud.nacos.config.shared-configs[0].refresh=true
## the default value is 'DEFAULT_GROUP' , if not specified.
#spring.cloud.nacos.config.shared-configs[0].group=GROUP_APP1

## not recommended.
#spring.cloud.nacos.config.ext-config[0]=ext.properties
## recommended.
spring.cloud.nacos.config.extension-configs[0].data-id=ext-data-source.yaml
spring.cloud.nacos.config.extension-configs[0].refresh=true

# the setting of reading config log print on stdout
logging.level.com.alibaba.cloud.nacos.client=debug


spring.cloud.nacos.config.refresh-enabled=true
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
server.port=65200

spring.application.name=sc-gateway-hoxton
spring.cloud.nacos.discovery.enabled=false
spring.cloud.nacos.discovery.enabled=true
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server.port=65200

spring.application.name=sc-gateway-hoxton
spring.cloud.nacos.config.enabled=true
spring.cloud.nacos.config.serverAddr=127.0.0.1:8848
spring.cloud.nacos.username='nacos'
spring.cloud.nacos.password='nacos'
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
#server.port=65001
#spring.application.name=service-provider-hoxton
#spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
#spring.cloud.nacos.discovery.enabled=false
#spring.cloud.nacos.config.enabled=false
#spring.cloud.gateway.discovery.locator.enabled=false
#spring.cloud.nacos.username=nacos
#spring.cloud.nacos.password=nacos
#
#management.endpoints.web.exposure.include=*
#management.endpoint.health.show-details=always
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
spring.cloud.nacos.discovery.enabled=true

management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
server.port=65001
spring.application.name=service-provider-hoxton
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
spring.cloud.nacos.discovery.enabled=false
spring.cloud.nacos.config.enabled=false
spring.cloud.gateway.discovery.locator.enabled=false
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
spring.cloud.nacos.config.enabled=true
spring.cloud.nacos.username=nacos
spring.cloud.nacos.password=nacos

management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
spring.cloud.nacos.password=nacos
Loading

0 comments on commit bc2ba6f

Please sign in to comment.