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

refactor:optimize the order and condition matching of service registration automatic configuration. #1129

Conversation

hligaty
Copy link
Contributor

@hligaty hligaty commented Sep 20, 2023

…stration automatic configuration.

PR Type

Refactoring (no functional changes, no api changes).

Describe what this PR does for and how you did.

服务注册自动配置有下面几个疑问:

  1. @AutoConfigureAfter 中 AutoServiceRegistrationConfiguration.class 应该是无效的。解决:移除这个参数
  2. PolarisServiceRegistry 定义需要在 ServiceRegistryAutoConfiguration 完成前执行。解决:添加 @AutoConfigureBefore
  3. 判断是否进行注册服务的条件注解放在服务注册自动配置类上覆盖所有 bean 会更清晰?

Adding the issue link (#xxx) if possible.

Note

Checklist

  • Add information of this PR to CHANGELOG.md in root of project.
  • Add documentation in javadoc or comment below the PR if necessary.

Checklist (Optional)

  • Will pull request to branch of 2020.0.
  • Will pull request to branch of 2022.0.

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #1129 (bc6c527) into 2021.0 (e51d9d2) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Current head bc6c527 differs from pull request most recent head f492376. Consider uploading reports for the commit f492376 to get more accurate results

@@             Coverage Diff              @@
##             2021.0    #1129      +/-   ##
============================================
+ Coverage     81.15%   81.16%   +0.01%     
- Complexity     1683     1684       +1     
============================================
  Files           252      252              
  Lines          5735     5735              
  Branches        677      677              
============================================
+ Hits           4654     4655       +1     
  Misses          689      689              
+ Partials        392      391       -1     
Files Changed Coverage Δ
...istry/PolarisServiceRegistryAutoConfiguration.java 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

Copy link
Collaborator

@SkyeBeFreeman SkyeBeFreeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加一下提交信息到CHANGELOG.md内~

@hligaty
Copy link
Contributor Author

hligaty commented Sep 21, 2023

CHANGELOG 已提交

@SkyeBeFreeman SkyeBeFreeman changed the title refactor:optimize the order and condition matching of service regi… refactor:optimize the order and condition matching of service registration automatic configuration. Sep 22, 2023
@SkyeBeFreeman
Copy link
Collaborator

2022、2020、hoxton分支也cherry-pick一份

@SkyeBeFreeman SkyeBeFreeman merged commit 2c04288 into Tencent:2021.0 Sep 22, 2023
8 checks passed
@SkyeBeFreeman SkyeBeFreeman added this to the 1.13.0 milestone Sep 22, 2023
@hligaty hligaty deleted the 2021.0-optimize_the_order_and_condition_matching_of_service_registration_automatic_configuration branch September 22, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants