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

[type:fix] SpringCloud Plugin builds nacos repository from YAML with inconsistent configuration properties (#5900) #5902

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public class SpringCloudPluginDataHandler implements PluginDataHandler {

private static final Logger LOG = LoggerFactory.getLogger(SpringCloudPluginDataHandler.class);

private static final String NAMESPACE = "nacosNameSpace";

private static final String GROUP = "groupName";

private final ShenyuConfig.SpringCloudCacheConfig springCloudCacheConfig;

private final Environment env;
Expand Down Expand Up @@ -192,7 +196,8 @@ private void readYmlBuildRepository() {
final String serverLists = env.getProperty("spring.cloud.nacos.discovery.server-addr");
final String prefix = "spring.cloud.nacos.discovery.";
Properties properties = new Properties();
properties.put(PropertyKeyConst.NAMESPACE, env.getProperty(prefix + PropertyKeyConst.NAMESPACE));
properties.put(NAMESPACE, env.getProperty(prefix + PropertyKeyConst.NAMESPACE));
properties.put(GROUP, env.getProperty(prefix + "group"));
if (env.getProperty(prefix + PropertyKeyConst.USERNAME) != null) {
properties.put(PropertyKeyConst.USERNAME, env.getProperty(prefix + PropertyKeyConst.USERNAME));
}
Expand Down
Loading