Skip to content

Commit

Permalink
ban nacos registry and config (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikliu authored Jun 24, 2024
1 parent db7a817 commit 31013a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import cn.polarismesh.agent.core.bootstrap.starter.BootStrapStarter;
import cn.polarismesh.agent.core.bootstrap.util.AgentDirUtils;
import cn.polarismesh.agent.core.common.utils.JarFileUtils;
import cn.polarismesh.agent.core.bootstrap.PolarisInitProperties;

import java.lang.instrument.Instrumentation;
import java.util.List;
Expand All @@ -40,6 +41,9 @@ public static void premain(String agentArgs, Instrumentation instrumentation, St
return;
}

PolarisInitProperties polarisInitProperties = new PolarisInitProperties();
polarisInitProperties.initialize();

logger.info("[Bootstrap] polaris-agent agentArgs:" + agentArgs);
logger.info("[Bootstrap] polarisAgentBootStrap.ClassLoader:" + PolarisAgentBootStrap.class.getClassLoader());
logger.info("[Bootstrap] contextClassLoader:" + Thread.currentThread().getContextClassLoader());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package cn.polarismesh.agent.core.bootstrap;

public class PolarisInitProperties {

public void initialize() {

// ban nacos as sct currently does not support double registration
System.setProperty("spring.cloud.nacos.config.enabled", "false");
System.setProperty("spring.cloud.nacos.discovery.enabled", "false");

}
}

0 comments on commit 31013a7

Please sign in to comment.