-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add mongo layer * Add mongo layer * Update doi service * updates * test * test * Remove jsonschema2pojo * trivy * sonar * sonar * Update pidStatus to TOMBSTONED * Update pidStatus to TOMBSTONED * Update pidStatus to TOMBSTONED * format * code reivw
- Loading branch information
Showing
63 changed files
with
3,358 additions
and
5,522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# April 17 | ||
# Spring boot needs to update its version of spring | ||
CVE-2024-22262 | ||
# July 17 | ||
# Spring boot needs to update its version of Apache Tomcat | ||
CVE-2024-34750 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
target/ | ||
.idea | ||
src/main/resources/* | ||
src/main/resources/application.properties | ||
.mvn/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
src/main/java/eu/dissco/core/handlemanager/configuration/BatchInserterConfig.java
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
src/main/java/eu/dissco/core/handlemanager/configuration/InstantDeserializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package eu.dissco.core.handlemanager.configuration; | ||
|
||
import static eu.dissco.core.handlemanager.configuration.AppConfig.DATE_STRING; | ||
|
||
import com.fasterxml.jackson.core.JsonParser; | ||
import com.fasterxml.jackson.databind.DeserializationContext; | ||
import com.fasterxml.jackson.databind.JsonDeserializer; | ||
import java.io.IOException; | ||
import java.time.Instant; | ||
import java.time.ZoneOffset; | ||
import java.time.format.DateTimeFormatter; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
public class InstantDeserializer extends JsonDeserializer<Instant> { | ||
|
||
private final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_STRING).withZone( | ||
ZoneOffset.UTC); | ||
|
||
@Override | ||
public Instant deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) { | ||
try { | ||
return Instant.from(formatter.parse(jsonParser.getText())); | ||
} catch (IOException e) { | ||
log.error("An error has occurred deserializing a date. More information: {}", e.getMessage()); | ||
return null; | ||
} | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/eu/dissco/core/handlemanager/configuration/InstantSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package eu.dissco.core.handlemanager.configuration; | ||
|
||
import static eu.dissco.core.handlemanager.configuration.AppConfig.DATE_STRING; | ||
|
||
import com.fasterxml.jackson.core.JsonGenerator; | ||
import com.fasterxml.jackson.databind.JsonSerializer; | ||
import com.fasterxml.jackson.databind.SerializerProvider; | ||
import java.io.IOException; | ||
import java.time.Instant; | ||
import java.time.ZoneOffset; | ||
import java.time.format.DateTimeFormatter; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
public class InstantSerializer extends JsonSerializer<Instant> { | ||
|
||
private final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_STRING).withZone( | ||
ZoneOffset.UTC); | ||
|
||
@Override | ||
public void serialize(Instant value, JsonGenerator jsonGenerator, | ||
SerializerProvider serializerProvider) { | ||
try { | ||
jsonGenerator.writeString(formatter.format(value)); | ||
} catch (IOException e) { | ||
log.error("An error has occurred serializing a date. More information: {}", e.getMessage()); | ||
} | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/eu/dissco/core/handlemanager/configuration/MongoConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package eu.dissco.core.handlemanager.configuration; | ||
|
||
import com.mongodb.client.MongoClients; | ||
import com.mongodb.client.MongoCollection; | ||
import eu.dissco.core.handlemanager.properties.MongoProperties; | ||
import lombok.RequiredArgsConstructor; | ||
import org.bson.Document; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
@RequiredArgsConstructor | ||
public class MongoConfig { | ||
|
||
private final MongoProperties properties; | ||
|
||
@Bean | ||
public MongoCollection<Document> getHandleCollection() { | ||
var client = MongoClients.create(properties.getConnectionString()); | ||
var database = client.getDatabase(properties.getDatabase()); | ||
return database.getCollection("handles"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
src/main/java/eu/dissco/core/handlemanager/database/jooq/DefaultCatalog.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.