fix: The repeated creation of PolarisPropertySourceManager results in the failure of configuration refresh.

pull/1643/head
shedfreewu 2 months ago
parent ec2837be3f
commit 337fa1d171

@ -30,10 +30,10 @@ import java.util.concurrent.ConcurrentHashMap;
*/ */
public class PolarisPropertySourceManager { public class PolarisPropertySourceManager {
private final Map<String, PolarisPropertySource> polarisPropertySources = new ConcurrentHashMap<>(); private static final Map<String, PolarisPropertySource> polarisPropertySources = new ConcurrentHashMap<>();
public void addPropertySource(PolarisPropertySource polarisPropertySource) { public void addPropertySource(PolarisPropertySource polarisPropertySource) {
polarisPropertySources.putIfAbsent(polarisPropertySource.getPropertySourceName(), polarisPropertySource); polarisPropertySources.put(polarisPropertySource.getPropertySourceName(), polarisPropertySource);
} }
public List<PolarisPropertySource> getAllPropertySources() { public List<PolarisPropertySource> getAllPropertySources() {

Loading…
Cancel
Save