Skip to content

Commit

Permalink
Merge pull request #8 from nacos-group/1.1
Browse files Browse the repository at this point in the history
Fix alibaba/nacos#12387, avoid duplicate add ElementSelector to RuleStore.
  • Loading branch information
KomachiSion authored Jul 22, 2024
2 parents 32ba4c0 + 38913de commit 92e826e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.alibaba.nacos</groupId>
<artifactId>logback-adapter</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<name>logback-adapter</name>
<description>logback-adapter</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ protected void addModelHandlerAssociations(DefaultProcessor defaultProcessor) {

@Override
public void addElementSelectorAndActionAssociations(RuleStore ruleStore) {
super.addElementSelectorAndActionAssociations(ruleStore);
ruleStore
.addRule(new ElementSelector("configuration/nacosClientProperty"), NacosClientPropertyModelAction::new);
ElementSelector elementSelector = new ElementSelector("configuration/nacosClientProperty");
if (null == ruleStore.matchActions(elementSelector.duplicate())) {
super.addElementSelectorAndActionAssociations(ruleStore);
ruleStore.addRule(elementSelector, NacosClientPropertyModelAction::new);
}
}

/**
Expand Down

0 comments on commit 92e826e

Please sign in to comment.