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. #1131

Conversation

hligaty
Copy link
Contributor

@hligaty hligaty commented Sep 22, 2023

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.

@SkyeBeFreeman SkyeBeFreeman added this to the 1.13.0 milestone Sep 22, 2023
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #1131 (0f6b3d2) into 2022.0 (0db7b3b) will increase coverage by 0.11%.
Report is 1 commits behind head on 2022.0.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             2022.0    #1131      +/-   ##
============================================
+ Coverage     81.20%   81.31%   +0.11%     
- Complexity     1672     1674       +2     
============================================
  Files           252      252              
  Lines          5692     5689       -3     
  Branches        662      661       -1     
============================================
+ Hits           4622     4626       +4     
+ Misses          688      682       -6     
+ Partials        382      381       -1     
Files Changed Coverage Δ
...istry/PolarisServiceRegistryAutoConfiguration.java 100.00% <ø> (ø)

... and 5 files with indirect coverage changes

@SkyeBeFreeman SkyeBeFreeman merged commit 6d75891 into Tencent:2022.0 Sep 22, 2023
5 checks passed
@hligaty hligaty deleted the 2022.0-optimize_the_order_and_condition_matching_of_service_registration_automatic_configuration branch September 22, 2023 07:58
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