GH-301 - Polishing.

Formatting, visibility. Some refactorings in Neo4jEventPublicationRepository.
This commit is contained in:
Oliver Drotbohm
2023-09-20 16:53:16 +02:00
parent 4e069b98ea
commit ffb9495e15
12 changed files with 471 additions and 336 deletions

View File

@@ -1,56 +1,58 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.modulith</groupId>
<artifactId>spring-modulith-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<parent>
<groupId>org.springframework.modulith</groupId>
<artifactId>spring-modulith-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>spring-modulith-example-epr-neo4j</artifactId>
<name>Spring Modulith - Examples - EPR Neo4j Example</name>
<artifactId>spring-modulith-example-epr-neo4j</artifactId>
<name>Spring Modulith - Examples - EPR Neo4j Example</name>
<dependencies>
<dependencies>
<dependency>
<groupId>org.springframework.modulith</groupId>
<artifactId>spring-modulith-starter-neo4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.modulith</groupId>
<artifactId>spring-modulith-starter-neo4j</artifactId>
</dependency>
<!-- jMolecules -->
<!-- jMolecules -->
<dependency>
<groupId>org.jmolecules</groupId>
<artifactId>jmolecules-events</artifactId>
</dependency>
<dependency>
<groupId>org.jmolecules</groupId>
<artifactId>jmolecules-events</artifactId>
</dependency>
<!-- Persistence -->
<!-- Persistence -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>neo4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>neo4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</dependencies>
</project>

View File

@@ -17,6 +17,9 @@ package example;
import example.inventory.InventoryUpdated;
import example.order.OrderManagement;
import java.util.Collection;
import org.junit.jupiter.api.Test;
import org.neo4j.cypherdsl.core.renderer.Configuration;
import org.neo4j.cypherdsl.core.renderer.Dialect;
@@ -34,8 +37,6 @@ import org.springframework.modulith.test.Scenario;
import org.testcontainers.containers.Neo4jContainer;
import org.testcontainers.junit.jupiter.Testcontainers;
import java.util.Collection;
/**
* @author Oliver Drotbohm
* @author Gerrit Meier
@@ -46,7 +47,7 @@ import java.util.Collection;
class ApplicationIntegrationTests {
@TestConfiguration
static class MongoDbInfrastructureConfiguration {
static class InfrastructureConfiguration {
@Bean
@ServiceConnection
@@ -55,12 +56,12 @@ class ApplicationIntegrationTests {
}
@Bean
public Driver driver(Neo4jContainer<?> container) {
Driver driver(Neo4jContainer<?> container) {
return GraphDatabase.driver(container.getBoltUrl(), AuthTokens.basic("neo4j", container.getAdminPassword()));
}
@Bean
public Configuration cypherDslConfiguration() {
Configuration cypherDslConfiguration() {
return Configuration.newConfig().withDialect(Dialect.NEO4J_5).build();
}
}