Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhance] getting arguments use an unified way in the client module #8622

Closed
onewe opened this issue Jun 24, 2022 · 2 comments
Closed

[Enhance] getting arguments use an unified way in the client module #8622

onewe opened this issue Jun 24, 2022 · 2 comments
Assignees
Labels
area/Client Related to Nacos Client SDK good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.
Milestone

Comments

@onewe
Copy link
Collaborator

onewe commented Jun 24, 2022

Backgroud

背景

There are three ways of getting arguments in the client module now, from the properties、from the Jvm arguments and from the system environment. so it needs an unified way that get arguments.

现在总共有3种获取参数的方式在客户端模块中, 有从 properties中获取的、从Jvm参数获取的和从System环境变了中获取的. 所以需要一种统一获取参数的方式.

The reasons are as follows:

  • switch arguments getting order
  • better mock test

原因如下:

  • 提供切换参数读取顺序能力
  • 更方便的模拟测试

More detail see https://www.yuque.com/docs/share/e9fcd9a3-f3fb-496d-9b8b-bf4b88db4df0

@li-xiao-shuang
Copy link
Collaborator

链接好像失效了

@li-xiao-shuang li-xiao-shuang added kind/enhancement Category issues or prs related to enhancement. good first issue Good for newcomers labels Jun 27, 2022
onewe added a commit to onewe/nacos that referenced this issue Jun 30, 2022
onewe added a commit to onewe/nacos that referenced this issue Jun 30, 2022
onewe added a commit to onewe/nacos that referenced this issue Jul 8, 2022
- remove magic number
- refactor all of them
- add some unit tests for env
- modify search rule and reformat
- fix search order
- fix p3c error
KomachiSion pushed a commit that referenced this issue Jul 11, 2022
* [ISSUES #8622] Add NacosEnvironment and add some unit tests

- remove magic number
- refactor all of them
- add some unit tests for env
- modify search rule and reformat
- fix search order
- fix p3c error

* fix ci error

* add some type converters

- enhance search method
- default_setting.properties is renamed nacos_default_setting.properties

* the property key of system environment replace dot with underscore

* add some default values and enhance SystemEnvPropertySource

* add the copyright information
@KomachiSion KomachiSion added this to the 2.1.1 milestone Jul 19, 2022
onewe added a commit to onewe/nacos that referenced this issue Aug 11, 2022
- add setProperty,addProperties and containsKey methods
- remove PropertySourceSearch
onewe added a commit to onewe/nacos that referenced this issue Aug 11, 2022
- add setProperty,addProperties and containsKey methods
- remove PropertySourceSearch
onewe added a commit to onewe/nacos that referenced this issue Oct 20, 2022
…Properties

- add NacosClientPropertiesLookup for log4j2
- add NacosClientPropertyAction for logback
- add a new constructor method to adapt NacosClientProperties for NacosNamingMaintainService
- add a new constructor method to adapt NacosClientProperties for NacosNamingService
- add a new constructor method to adapt NacosClientProperties for NacosConfigService
onewe added a commit to onewe/nacos that referenced this issue Oct 20, 2022
onewe added a commit to onewe/nacos that referenced this issue Oct 20, 2022
onewe added a commit to onewe/nacos that referenced this issue Oct 20, 2022
onewe added a commit to onewe/nacos that referenced this issue Oct 20, 2022
@KomachiSion KomachiSion reopened this Oct 26, 2022
@KomachiSion KomachiSion modified the milestones: 2.1.1, 2.2.0 Oct 26, 2022
onewe added a commit to onewe/nacos that referenced this issue Nov 2, 2022
- Replace system.getProperties and system.getEnv with  NacosClientProperties
- remove address server controller IT

relate alibaba#9356
onewe added a commit to onewe/nacos that referenced this issue Nov 2, 2022
- Replace system.getProperties and system.getEnv with  NacosClientProperties
- log4j and logback support reading properties from NacosClientProperties

relate alibaba#9356
onewe added a commit to onewe/nacos that referenced this issue Nov 2, 2022
onewe added a commit to onewe/nacos that referenced this issue Nov 2, 2022
onewe added a commit to onewe/nacos that referenced this issue Nov 2, 2022
- Replace system.getProperties and system.getEnv with NacosClientProperties

relate alibaba#9356
onewe added a commit to onewe/nacos that referenced this issue Nov 3, 2022
- Replace system.getProperties and system.getEnv with NacosClientProperties

relate alibaba#9356
onewe added a commit to onewe/nacos that referenced this issue Nov 3, 2022
KomachiSion pushed a commit that referenced this issue Nov 3, 2022
* [ISSUE #8622] sub pr of 9356 - auth module

- Replace system.getProperties and system.getEnv with  NacosClientProperties
- remove address server controller IT

relate #9356

* [ISSUE #8622] rollback about app name

* [ISSUE #8622] remove unused import

* [ISSUE #8622] retry ci
KomachiSion pushed a commit that referenced this issue Nov 3, 2022
- Replace system.getProperties and system.getEnv with NacosClientProperties

relate #9356
onewe added a commit to onewe/nacos that referenced this issue Nov 3, 2022
onewe added a commit to onewe/nacos that referenced this issue Nov 4, 2022
onewe added a commit to onewe/nacos that referenced this issue Nov 4, 2022
KomachiSion pushed a commit that referenced this issue Nov 4, 2022
* [ISSUE #8622] sub pr of 9356 - logging module

- Replace system.getProperties and system.getEnv with  NacosClientProperties
- log4j and logback support reading properties from NacosClientProperties

relate #9356

* [ISSUE #8622] add unit tests for logging
KomachiSion pushed a commit that referenced this issue Nov 4, 2022
* [ISSUE #8622] resolve conflict

* [ISSUE #8622] fix unit test error
@xishian
Copy link

xishian commented May 29, 2024

这个类跟用户侧有什么关系?为什么出现在Java SDK的文档里?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Client Related to Nacos Client SDK good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

No branches or pull requests

4 participants