Skip to content

Commit 10ca1ca

Browse files
authored
Merge pull request #200 from scalecube/cleanup
2 parents a404fce + 967a501 commit 10ca1ca

File tree

19 files changed

+39
-1406
lines changed

19 files changed

+39
-1406
lines changed

config-examples/pom.xml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35

46
<parent>
57
<groupId>io.scalecube</groupId>
@@ -10,35 +12,12 @@
1012

1113
<artifactId>scalecube-config-examples</artifactId>
1214

13-
<properties>
14-
<log4j.version>2.17.1</log4j.version>
15-
</properties>
16-
1715
<dependencies>
1816
<dependency>
1917
<groupId>io.scalecube</groupId>
2018
<artifactId>scalecube-config</artifactId>
2119
<version>${project.version}</version>
2220
</dependency>
23-
<dependency>
24-
<groupId>io.scalecube</groupId>
25-
<artifactId>scalecube-config-mongo</artifactId>
26-
<version>${project.version}</version>
27-
</dependency>
28-
<dependency>
29-
<groupId>io.scalecube</groupId>
30-
<artifactId>scalecube-config-http-server</artifactId>
31-
<version>${project.version}</version>
32-
</dependency>
33-
<dependency>
34-
<groupId>org.apache.logging.log4j</groupId>
35-
<artifactId>log4j-slf4j-impl</artifactId>
36-
<version>${log4j.version}</version>
37-
</dependency>
38-
<dependency>
39-
<groupId>org.apache.logging.log4j</groupId>
40-
<artifactId>log4j-core</artifactId>
41-
<version>${log4j.version}</version>
42-
</dependency>
4321
</dependencies>
22+
4423
</project>

config-examples/src/main/java/io/scalecube/config/examples/ConfigRegistryExample.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import io.scalecube.config.ConfigRegistrySettings;
55
import io.scalecube.config.StringConfigProperty;
66
import io.scalecube.config.audit.Slf4JConfigEventListener;
7-
import io.scalecube.config.http.server.ConfigRegistryHttpServer;
87
import io.scalecube.config.source.ClassPathConfigSource;
98
import io.scalecube.config.source.FileDirectoryConfigSource;
109
import java.nio.file.Path;
@@ -37,8 +36,5 @@ public static void main(String[] args) {
3736
StringConfigProperty orderedProp1 = configRegistry.stringProperty("orderedProp1");
3837

3938
System.out.println("### Matched by first predicate orderedProp1=" + orderedProp1.value().get());
40-
41-
// Start REST HTTP Server
42-
ConfigRegistryHttpServer.create(configRegistry, 5050);
4339
}
4440
}

config-examples/src/main/java/io/scalecube/config/examples/DemoConfig.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
import io.scalecube.config.ConfigRegistrySettings;
55
import io.scalecube.config.StringConfigProperty;
66
import io.scalecube.config.audit.Slf4JConfigEventListener;
7-
import io.scalecube.config.http.server.ConfigRegistryHttpServer;
8-
import io.scalecube.config.keyvalue.KeyValueConfigSource;
9-
import io.scalecube.config.mongo.MongoConfigConnector;
10-
import io.scalecube.config.mongo.MongoConfigEventListener;
11-
import io.scalecube.config.mongo.MongoConfigRepository;
127
import io.scalecube.config.source.FileDirectoryConfigSource;
138
import java.nio.file.Path;
149
import java.util.function.Predicate;
@@ -28,14 +23,6 @@ public static void main(String[] args) {
2823
String configSourceCollectionName = "MongoConfigRepository";
2924
String auditLogCollectionName = "TestConfigurationAuditLog";
3025

31-
MongoConfigConnector connector = MongoConfigConnector.builder().forUri(uri).build();
32-
33-
KeyValueConfigSource mongoConfigSource =
34-
KeyValueConfigSource.withRepository(
35-
new MongoConfigRepository(connector), configSourceCollectionName)
36-
.groups("group2", "group1", "root")
37-
.build();
38-
3926
// Local resource cfg source init
4027
Predicate<Path> propsPredicate = path -> path.toString().endsWith(".props");
4128
String basePath = "config-examples/config";
@@ -46,9 +33,7 @@ public static void main(String[] args) {
4633
ConfigRegistrySettings.builder()
4734
.addLastSource(
4835
"ConfigDirectory", new FileDirectoryConfigSource(basePath, propsPredicate))
49-
.addLastSource("MongoConfig", mongoConfigSource)
5036
.addListener(new Slf4JConfigEventListener())
51-
.addListener(new MongoConfigEventListener(connector, auditLogCollectionName))
5237
.keepRecentConfigEvents(10)
5338
.reloadIntervalSec(3)
5439
.jmxEnabled(true)
@@ -57,9 +42,6 @@ public static void main(String[] args) {
5742

5843
// Inject cfgReg into target component
5944
SomeComponent component = new SomeComponent(configRegistry);
60-
61-
// Start REST HTTP Server
62-
ConfigRegistryHttpServer.create(configRegistry, 5050);
6345
}
6446

6547
static class SomeComponent {

config-examples/src/main/java/io/scalecube/config/examples/JsonObjectExample.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

config-examples/src/main/java/io/scalecube/config/examples/MongoConfigExample.java

Lines changed: 0 additions & 93 deletions
This file was deleted.

config-http-server/pom.xml

Lines changed: 0 additions & 40 deletions
This file was deleted.

config-http-server/src/main/java/io/scalecube/config/http/server/ConfigRegistryHttpServer.java

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)