Skip to content

Commit 0d67290

Browse files
Merge branch 'master' into fix/pass-metadata-to-events
2 parents f7751a6 + 3f1aadf commit 0d67290

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Heroes of Domain-Driven Design (Java)
22
Shows how to use Domain-Driven Design, Event Storming, Event Modeling and Event Sourcing in Heroes of Might & Magic III domain.
33

4-
👉 See also implementations in: [Ruby](https://github.com/MateuszNaKodach/HeroesOfDomainDrivenDesign.EventSourcing.Ruby) | **Java + Spring + Axon**
4+
👉 See also implementations in:
5+
- [Kotlin + Axon Framework 5 (DCB)](https://github.com/MateuszNaKodach/HeroesOfDomainDrivenDesign.EventSourcing.DCB.Kotlin.Axon5.Spring)
6+
- [TypeScript + Emmett](https://github.com/MateuszNaKodach/HeroesOfDomainDrivenDesign.EventSourcing.TypeScript.Emmett.Express)
7+
- [Ruby + RailsEventStore](https://github.com/MateuszNaKodach/HeroesOfDomainDrivenDesign.EventSourcing.Ruby)
58

69
👉 [Let's explore the Heroes of Domain-Driven Design blogpost series](https://dddheroes.com/)
710
- There you will get familiar with the whole Software Development process: from knowledge crunching with domain experts, designing solution using Event Modeling, to implementation using DDD Building Blocks.
811

9-
This project probably won't be fully-functional HOMM3 engine implementation, because it's done for educational purposes.
10-
If you'd like to talk with me about mentioned development practices fell free to contact on [linkedin.com/in/mateusznakodach/](https://www.linkedin.com/in/mateusznakodach).
12+
This project probably won't be a fully functional HOMM3 engine implementation because it's done for educational purposes.
13+
If you'd like to talk with me about mentioned development practices, feel free to contact on [linkedin.com/in/mateusznakodach/](https://www.linkedin.com/in/mateusznakodach).
1114

1215
I'm focused on domain modeling on the backend, but I'm going to implement UI like below in the future.
1316

pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.4.2</version>
8+
<version>3.4.5</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.dddheroes</groupId>
@@ -27,10 +27,11 @@
2727
<url/>
2828
</scm>
2929
<properties>
30+
<assertj.version>3.27.3</assertj.version>
3031
<axon.version>4.11.1</axon.version>
3132
<java.version>23</java.version>
3233
<spring-doc.version>2.8.5</spring-doc.version>
33-
<spring-modulith.version>1.3.2</spring-modulith.version>
34+
<spring-modulith.version>1.3.5</spring-modulith.version>
3435
</properties>
3536
<dependencies>
3637
<dependency>
@@ -134,7 +135,7 @@
134135
<dependency>
135136
<groupId>org.assertj</groupId>
136137
<artifactId>assertj-core</artifactId>
137-
<version>3.27.3</version>
138+
<version>${assertj.version}</version>
138139
<scope>test</scope>
139140
</dependency>
140141
</dependencies>

src/main/java/com/dddheroes/heroesofddd/creaturerecruitment/read/getalldwellings/GetAllDwellingsQueryHandler.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
import com.dddheroes.heroesofddd.creaturerecruitment.read.DwellingReadModelRepository;
55
import com.dddheroes.heroesofddd.creaturerecruitment.events.DwellingBuilt;
66
import com.dddheroes.heroesofddd.shared.application.GameMetaData;
7-
import com.google.common.collect.Streams;
87
import org.axonframework.config.ProcessingGroup;
98
import org.axonframework.eventhandling.EventHandler;
109
import org.axonframework.messaging.annotation.MetaDataValue;
1110
import org.axonframework.queryhandling.QueryHandler;
1211
import org.springframework.stereotype.Component;
1312

1413
import java.util.concurrent.ConcurrentLinkedDeque;
14+
import java.util.stream.Stream;
1515

1616
@ProcessingGroup("Read_GetAllDwellings_QueryCache")
1717
@Component
@@ -28,12 +28,12 @@ class GetAllDwellingsQueryHandler {
2828
GetAllDwellings.Result handle(GetAllDwellings query) {
2929
var gameId = query.gameId().raw();
3030
var dwellings = dwellingReadModelRepository.findAllByGameId(gameId);
31-
var result = Streams.concat(
32-
dwellings.stream(),
33-
cache.stream().filter(it -> it.getGameId().equals(gameId))
34-
) // todo: check ordering
35-
.distinct()
36-
.toList();
31+
var result = Stream.concat(
32+
dwellings.stream(),
33+
cache.stream().filter(it -> it.getGameId().equals(gameId))
34+
) // todo: check ordering
35+
.distinct()
36+
.toList();
3737
return new GetAllDwellings.Result(result);
3838
}
3939

0 commit comments

Comments
 (0)