Skip to content

Commit ffb9495

Browse files
committed
GH-301 - Polishing.
Formatting, visibility. Some refactorings in Neo4jEventPublicationRepository.
1 parent 4e069b9 commit ffb9495

File tree

12 files changed

+493
-358
lines changed

12 files changed

+493
-358
lines changed
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
<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-
<modelVersion>4.0.0</modelVersion>
3-
4-
<parent>
5-
<groupId>org.springframework.modulith</groupId>
6-
<artifactId>spring-modulith-events</artifactId>
7-
<version>1.1.0-SNAPSHOT</version>
8-
<relativePath>../pom.xml</relativePath>
9-
</parent>
10-
11-
<name>Spring Modulith - Events - Neo4j-based repository</name>
12-
<artifactId>spring-modulith-events-neo4j</artifactId>
13-
14-
<properties>
15-
<module.name>org.springframework.modulith.events.neo4j</module.name>
16-
</properties>
17-
18-
<dependencies>
19-
20-
<dependency>
21-
<groupId>${project.groupId}</groupId>
22-
<artifactId>spring-modulith-events-core</artifactId>
23-
<version>${project.version}</version>
24-
</dependency>
25-
26-
<dependency>
27-
<groupId>org.springframework.data</groupId>
28-
<artifactId>spring-data-neo4j</artifactId>
29-
</dependency>
30-
31-
<dependency>
32-
<groupId>org.springframework.boot</groupId>
33-
<artifactId>spring-boot-starter-test</artifactId>
34-
<scope>test</scope>
35-
</dependency>
36-
37-
<dependency>
38-
<groupId>org.springframework.boot</groupId>
39-
<artifactId>spring-boot-starter-data-neo4j</artifactId>
40-
<scope>test</scope>
41-
</dependency>
42-
43-
<dependency>
44-
<groupId>org.testcontainers</groupId>
45-
<artifactId>neo4j</artifactId>
46-
<version>1.19.0</version>
47-
<scope>test</scope>
48-
</dependency>
49-
50-
<dependency>
51-
<groupId>org.testcontainers</groupId>
52-
<artifactId>junit-jupiter</artifactId>
53-
<version>1.19.0</version>
54-
<scope>test</scope>
55-
</dependency>
56-
57-
</dependencies>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>org.springframework.modulith</groupId>
8+
<artifactId>spring-modulith-events</artifactId>
9+
<version>1.1.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
11+
</parent>
12+
13+
<name>Spring Modulith - Events - Neo4j-based repository</name>
14+
<artifactId>spring-modulith-events-neo4j</artifactId>
15+
16+
<properties>
17+
<module.name>org.springframework.modulith.events.neo4j</module.name>
18+
</properties>
19+
20+
<dependencies>
21+
22+
<dependency>
23+
<groupId>${project.groupId}</groupId>
24+
<artifactId>spring-modulith-events-core</artifactId>
25+
<version>${project.version}</version>
26+
</dependency>
27+
28+
<dependency>
29+
<groupId>org.springframework.data</groupId>
30+
<artifactId>spring-data-neo4j</artifactId>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.springframework.boot</groupId>
35+
<artifactId>spring-boot-starter-test</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.springframework.boot</groupId>
41+
<artifactId>spring-boot-starter-data-neo4j</artifactId>
42+
<scope>test</scope>
43+
</dependency>
44+
45+
<dependency>
46+
<groupId>org.testcontainers</groupId>
47+
<artifactId>neo4j</artifactId>
48+
<scope>test</scope>
49+
</dependency>
50+
51+
<dependency>
52+
<groupId>org.testcontainers</groupId>
53+
<artifactId>junit-jupiter</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
57+
</dependencies>
5858
</project>
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1+
/*
2+
* Copyright 2023 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package org.springframework.modulith.events.neo4j;
217

318
import java.time.Instant;
419
import java.util.UUID;
520

621
/**
7-
*
822
* The event publication entity definition.
923
*
1024
* @author Gerrit Meier
25+
* @since 1.1
1126
*/
12-
public class Neo4jEventPublication {
27+
class Neo4jEventPublication {
1328

1429
public final UUID identifier;
1530
public final Instant publicationDate;
@@ -19,12 +34,13 @@ public class Neo4jEventPublication {
1934

2035
public Instant completionDate;
2136

22-
public Neo4jEventPublication(UUID identifier, Instant publicationDate, String listenerId, Object event, String eventHash) {
37+
public Neo4jEventPublication(UUID identifier, Instant publicationDate, String listenerId, Object event,
38+
String eventHash) {
39+
2340
this.identifier = identifier;
2441
this.publicationDate = publicationDate;
2542
this.listenerId = listenerId;
2643
this.event = event;
2744
this.eventHash = eventHash;
2845
}
29-
3046
}

spring-modulith-events/spring-modulith-events-neo4j/src/main/java/org/springframework/modulith/events/neo4j/Neo4jEventPublicationAutoConfiguration.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@
1212
import org.springframework.modulith.events.core.EventSerializer;
1313

1414
/**
15+
* Auto-configuration to register a {@link Neo4jEventPublicationRepository}, a default {@link Configuration} and a
16+
* {@link Neo4jIndexInitializer} if enabled.
17+
*
1518
* @author Gerrit Meier
19+
* @since 1.1
1620
*/
1721
@AutoConfiguration
1822
@AutoConfigureBefore(EventPublicationAutoConfiguration.class)
19-
public class Neo4jEventPublicationAutoConfiguration implements EventPublicationConfigurationExtension {
23+
class Neo4jEventPublicationAutoConfiguration implements EventPublicationConfigurationExtension {
2024

2125
@Bean
22-
Neo4jEventPublicationRepository neo4jEventPublicationRepository(Neo4jClient neo4jClient, Configuration cypherDslConfiguration, EventSerializer eventSerializer) {
26+
Neo4jEventPublicationRepository neo4jEventPublicationRepository(Neo4jClient neo4jClient,
27+
Configuration cypherDslConfiguration, EventSerializer eventSerializer) {
2328
return new Neo4jEventPublicationRepository(neo4jClient, cypherDslConfiguration, eventSerializer);
2429
}
2530

0 commit comments

Comments
 (0)