Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ Run services `api-gateway`, `order-service`, `customer-service`, `inventory-serv
| Customer service | localhost:9091 |
| Inventory service | localhost:9093 |


> Note: service discovery now defaults to `localhost` for local development. If you run services in Docker and need a different address, set `SERVICE_HOSTNAME` before starting each service (for example `export SERVICE_HOSTNAME=host.docker.internal`).

### Start outbox connectors

Create outbox connectors
Expand Down
3 changes: 3 additions & 0 deletions customer-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spring:
consul:
host: ${CONSUL_HOST:localhost}
port: ${CONSUL_PORT:8500}
discovery:
prefer-ip-address: false
hostname: ${SERVICE_HOSTNAME:host.docker.internal}
function:
definition: handleReserveCustomerBalanceRequest;handleCompensateCustomerBalanceRequest
stream:
Expand Down
3 changes: 3 additions & 0 deletions inventory-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spring:
consul:
host: ${CONSUL_HOST:localhost}
port: ${CONSUL_PORT:8500}
discovery:
prefer-ip-address: false
hostname: ${SERVICE_HOSTNAME:host.docker.internal}
function:
definition: handleReserveProductStockRequest
stream:
Expand Down
3 changes: 3 additions & 0 deletions order-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ spring:
consul:
host: ${CONSUL_HOST:localhost}
port: ${CONSUL_PORT:8500}
discovery:
prefer-ip-address: false
hostname: ${SERVICE_HOSTNAME:host.docker.internal}
function:
definition: reserveCustomerBalanceStage;reserveProductStockStage
stream:
Expand Down
42 changes: 40 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

<properties>
<java.version>21</java.version>
<lombok.version>1.18.44</lombok.version>
<spring-cloud.version>2025.0.0</spring-cloud.version>
</properties>

Expand All @@ -41,6 +42,21 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Source: https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.44</version>
<scope>compile</scope>
</dependency>
<!-- Source: https://mvnrepository.com/artifact/org.projectlombok/lombok-maven -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven</artifactId>
<version>1.18.20.0</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream</artifactId>
Expand All @@ -59,11 +75,12 @@
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<optional>true</optional>
</dependency>
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -82,4 +99,25 @@
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>