Skip to content

Commit 1d04eb7

Browse files
authored
Merge pull request #17 from adrienlauer/morphia-upgrade
Remove async, upgrade driver and morphia
2 parents c06df12 + a4f577d commit 1d04eb7

File tree

14 files changed

+198
-513
lines changed

14 files changed

+198
-513
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Version 4.0.0 (2022-12-12)
2+
3+
* [brk] Remove support for deprecated async driver
4+
* [brk] Require at least MongoDb driver support to 4.1
5+
* [chg] Upgrade Morphia to 1.6.1 (which makes it compatible with AWS DocumentDB).
6+
17
# Version 3.1.3 (2021-07-31)
28

39
* [fix] Avoid calling `ensureIndexes()` and `ensureCaps()` for each datastore instantiation which adds a considerable

core/pom.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,15 @@
1414
<parent>
1515
<groupId>org.seedstack.addons.mongodb</groupId>
1616
<artifactId>mongodb</artifactId>
17-
<version>3.1.3-SNAPSHOT</version>
17+
<version>4.0.0-SNAPSHOT</version>
1818
</parent>
1919

2020
<artifactId>mongodb-core</artifactId>
2121

2222
<dependencies>
2323
<dependency>
2424
<groupId>org.mongodb</groupId>
25-
<artifactId>mongo-java-driver</artifactId>
26-
<version>${mongodb.version}</version>
27-
<scope>provided</scope>
28-
</dependency>
29-
<dependency>
30-
<groupId>org.mongodb</groupId>
31-
<artifactId>mongodb-driver-async</artifactId>
25+
<artifactId>mongodb-driver-legacy</artifactId>
3226
<version>${mongodb.version}</version>
3327
<scope>provided</scope>
3428
</dependency>

core/src/main/java/org/seedstack/mongodb/MongoDbConfig.java

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,12 @@ public MongoDbConfig addClient(String name, ClientConfig config) {
3030
}
3131

3232
public static class ClientConfig {
33-
private boolean async = false;
3433
@SingleValue
3534
private String uri;
3635
private List<String> hosts = new ArrayList<>();
37-
private List<String> credentials = new ArrayList<>();
36+
private String credentials;
3837
private Map<String, DatabaseConfig> databases = new HashMap<>();
3938

40-
public boolean isAsync() {
41-
return async;
42-
}
43-
44-
public ClientConfig setAsync(boolean async) {
45-
this.async = async;
46-
return this;
47-
}
48-
4939
public boolean isConfiguredByUri() {
5040
return uri != null;
5141
}
@@ -74,13 +64,12 @@ public ClientConfig addHost(String host) {
7464
return this;
7565
}
7666

77-
public List<String> getCredentials() {
78-
return Collections.unmodifiableList(credentials);
67+
public void setCredentials(String credentials) {
68+
this.credentials = credentials;
7969
}
8070

81-
public ClientConfig addCredential(String credential) {
82-
this.credentials.add(credential);
83-
return this;
71+
public String getCredentials() {
72+
return credentials;
8473
}
8574

8675
public Map<String, DatabaseConfig> getDatabases() {

core/src/main/java/org/seedstack/mongodb/internal/AbstractMongoDbManager.java

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

core/src/main/java/org/seedstack/mongodb/internal/AsyncMongoDbManager.java

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

0 commit comments

Comments
 (0)