P02: Maven multi-module skeleton — domain, application, adapter-persistence, adapter-web, bootstrap
build / build (push) Failing after 18s

This commit is contained in:
ShopForge Course
2026-09-17 12:17:07 +00:00
commit 392516f95c
23 changed files with 363 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent><groupId>dev.shopforge</groupId><artifactId>shopforge</artifactId><version>0.1.0-SNAPSHOT</version></parent>
<artifactId>shopforge-adapter-web</artifactId>
<name>ShopForge :: adapter-web</name>
<dependencies>
<dependency><groupId>dev.shopforge</groupId><artifactId>shopforge-application</artifactId></dependency>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>
</dependencies>
</project>
@@ -0,0 +1,13 @@
package dev.shopforge.web;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
class HealthController {
@GetMapping("/hello")
Map<String, String> hello() {
return Map.of("service", "shopforge", "status", "up");
}
}
@@ -0,0 +1,20 @@
package dev.shopforge.web;
import dev.shopforge.application.ShopService;
import dev.shopforge.domain.Shop;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/shops")
class ShopController {
private final ShopService service;
ShopController(ShopService service) { this.service = service; }
@GetMapping("/{subdomain}")
ShopResponse get(@PathVariable String subdomain) {
Shop s = service.bySubdomain(subdomain);
return new ShopResponse(s.id().value(), s.naam(), s.subdomain(), s.active());
}
}
@@ -0,0 +1,4 @@
package dev.shopforge.web;
/** DTO — domain ka Shop bahar nahi jaata (Java Doc 23 ka sabak). */
record ShopResponse(String id, String naam, String subdomain, boolean active) { }