Skip to content

Commit

Permalink
fix bug spring.cloud.nacos.config.enabled not work (#3908)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiyue1102 authored Nov 28, 2024
1 parent 242bba5 commit 92b81c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public boolean isResolvable(ConfigDataLocationResolverContext context,
String prefix = NacosPropertiesPrefixer.getPrefix(context.getBinder());

return context.getBinder()
.bind(prefix + "config.enabled", Boolean.class)
.bind(prefix + ".config.enabled", Boolean.class)
.orElse(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void testIsResolvable_givenDisable_thenReturnFalse() {

String prefix = NacosPropertiesPrefixer.getPrefix(environment);

this.environment.setProperty(prefix + "config.enabled", "false");
this.environment.setProperty(prefix + ".config.enabled", "false");
assertThat(
this.resolver.isResolvable(this.context, ConfigDataLocation.of("nacos:")))
.isFalse();
Expand Down

0 comments on commit 92b81c8

Please sign in to comment.