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

[Feature] Merge CommonConfigPostProcessor and ConfigPostProcessor #14264

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
* 2019/12/30
* it will be instead of CommonConfigPostProcessor
*/
@Deprecated
@SPI(scope = ExtensionScope.MODULE)
public interface ConfigPostProcessor extends CommonConfigPostProcessor {
public interface ConfigPostProcessor {

default void postProcessReferConfig(ReferenceConfig referenceConfig) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,14 +871,11 @@ protected boolean shouldJvmRefer(Map<String, String> map) {
private void postProcessConfig() {
List<ConfigPostProcessor> configPostProcessors = this.getExtensionLoader(ConfigPostProcessor.class)
.getActivateExtension(URL.valueOf("configPostProcessor://"), (String[]) null);
List<CommonConfigPostProcessor> commonConfigPostProcessors = this.getExtensionLoader(
CommonConfigPostProcessor.class)
.getActivateExtension(URL.valueOf("configPostProcessor://"), (String[]) null);

HashSet<CommonConfigPostProcessor> allConfigPostProcessor = new HashSet<>();
HashSet<ConfigPostProcessor> allConfigPostProcessor = new HashSet<>();

// merge common and old config
allConfigPostProcessor.addAll(commonConfigPostProcessors);
allConfigPostProcessor.addAll(configPostProcessors);
allConfigPostProcessor.addAll(configPostProcessors);

allConfigPostProcessor.forEach(component -> component.postProcessReferConfig(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,14 +1000,11 @@ private boolean isOnlyInJvm() {
private void postProcessConfig() {
List<ConfigPostProcessor> configPostProcessors = this.getExtensionLoader(ConfigPostProcessor.class)
.getActivateExtension(URL.valueOf("configPostProcessor://", getScopeModel()), (String[]) null);
List<CommonConfigPostProcessor> commonConfigPostProcessors = this.getExtensionLoader(
CommonConfigPostProcessor.class)
.getActivateExtension(URL.valueOf("configPostProcessor://"), (String[]) null);

HashSet<CommonConfigPostProcessor> allConfigPostProcessor = new HashSet<>();
HashSet<ConfigPostProcessor> allConfigPostProcessor = new HashSet<>();

// merge common and old config
allConfigPostProcessor.addAll(commonConfigPostProcessors);
allConfigPostProcessor.addAll(configPostProcessors);
allConfigPostProcessor.addAll(configPostProcessors);

allConfigPostProcessor.forEach(component -> component.postProcessServiceConfig(this));
Expand Down
4 changes: 0 additions & 4 deletions dubbo-distribution/dubbo-all-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -885,10 +885,6 @@
<resource>META-INF/dubbo/internal/org.apache.dubbo.common.json.JsonUtil</resource>
</transformer>

<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.config.CommonConfigPostProcessor</resource>
</transformer>

<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.registry.integration.ServiceURLCustomizer</resource>
</transformer>
Expand Down
4 changes: 0 additions & 4 deletions dubbo-distribution/dubbo-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -924,10 +924,6 @@
<resource>META-INF/dubbo/internal/org.apache.dubbo.common.json.JsonUtil</resource>
</transformer>

<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.config.CommonConfigPostProcessor</resource>
</transformer>

<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.registry.integration.ServiceURLCustomizer</resource>
</transformer>
Expand Down
3 changes: 0 additions & 3 deletions dubbo-distribution/dubbo-core-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,6 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.common.json.JsonUtil</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.config.CommonConfigPostProcessor</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/org.apache.dubbo.registry.integration.ServiceURLCustomizer</resource>
</transformer>
Expand Down
Loading