Skip to content

Commit 3d20ce3

Browse files
🔧 chore(mcp): add MCP configuration to application.yaml
1 parent fc77dce commit 3d20ce3

3 files changed

Lines changed: 57 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,39 @@ Tests focus on observable behavior using Axon Test Fixture:
8989
- Axon Server disabled by default (uses JPA event store)
9090
- Virtual threads enabled for better concurrency
9191
- Jackson serialization for events and messages
92-
- Game metadata correlation for event sequencing
92+
- Game metadata correlation for event sequencing
93+
94+
## Development Guidelines
95+
96+
### Library Usage
97+
- Always consult Context7 MCP server for latest library versions and documentation before using any external libraries
98+
- Keep dependencies up-to-date and verify compatibility with existing codebase
99+
100+
### Unit Testing Standards
101+
- **Framework**: Always use JUnit 5 for all unit tests
102+
- **Assertions**: Use AssertJ for fluent assertions
103+
- **Async Testing**: Use Awaitility for testing asynchronous operations
104+
- **Structure**: Use `// given` / `// when` / `// then` comments (with spaces) to separate test sections
105+
- **Organization**: Use JUnit 5 `@Nested` classes to group logically connected test cases:
106+
- Group by method under test
107+
- Group by shared given conditions
108+
- Group by feature/scenario variations
109+
110+
### Test Structure Example
111+
```java
112+
@Nested
113+
class WhenRecruitingCreatures {
114+
115+
@Nested
116+
class GivenDwellingHasAvailableCreatures {
117+
118+
@Test
119+
void shouldSuccessfullyRecruitCreatures() {
120+
// given
121+
122+
// when
123+
124+
// then
125+
}
126+
}
127+
}

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<axon.version>4.12.1</axon.version>
3232
<axoniq-console.version>1.9.3</axoniq-console.version>
3333
<java.version>23</java.version>
34+
<spring-ai.version>1.0.1</spring-ai.version>
3435
<spring-doc.version>2.8.5</spring-doc.version>
3536
<spring-modulith.version>1.4.1</spring-modulith.version>
3637
</properties>
@@ -78,6 +79,11 @@
7879
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
7980
<version>${spring-doc.version}</version>
8081
</dependency>
82+
<dependency>
83+
<groupId>org.springframework.ai</groupId>
84+
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
85+
<version>${spring-ai.version}</version>
86+
</dependency>
8187

8288
<!-- Runtime dependencies -->
8389
<dependency>

src/main/resources/application.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ spring:
44
threads:
55
virtual:
66
enabled: true
7+
ai:
8+
mcp:
9+
server:
10+
enabled: true
11+
name: "Heroes of Might & Magic III - DDD/Event Sourcing Server"
12+
version: "1.0.0"
13+
type: SYNC
14+
transport: WEBMVC
15+
instructions: "MCP server for Heroes of Might & Magic III domain built with DDD, Event Sourcing, and Axon Framework. Provides domain operations, game management tools, and educational DDD resources."
16+
sse-message-endpoint: /mcp/messages
17+
capabilities:
18+
tool: true
19+
resource: true
20+
prompt: true
21+
completion: false
722
datasource:
823
url: jdbc:postgresql://localhost:6446/heroes_of_ddd_development
924
username: heroes_of_ddd_db_user

0 commit comments

Comments
 (0)