This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zone-id: ${ZONE_ID:southern} | |
gateway-host: ${API_HOST:localhost:8080} | |
instance-id: ${HOSTNAME:${random.uuid}} | |
#all external server names | |
services: | |
url: | |
delivery-service: delivery-service | |
payment-service: payment-service | |
user-service: user-service | |
server: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>com.stacksaga</groupId> | |
<artifactId>stack-saga-cloud-gateway-adapter</artifactId> | |
<version>0.0.1</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.mono.stacksaga</groupId> | |
<artifactId>stack-saga-discovery-client</artifactId> | |
<version>0.0.1</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.mono.stacksaga</groupId> | |
<artifactId>stack-saga-spring-boot-starter-mysql</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.mono.stacksaga</groupId> | |
<artifactId>stack-saga-spring-boot-starter-core</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d \ | |
-p 4444:4444 \ | |
-e DB_URL=jdbc:mysql://localhost:3306/stacksaga_admin_db?createDatabaseIfNotExist=true \ | |
-e DB_R2DBC_URL=r2dbc:mysql://localhost:3306/stacksaga_admin_db \ | |
-e DB_USERNAME=root \ | |
-e DB_PASSWORD=*** \ | |
-e DROP_FIRST_DB=your-config \ | |
-e SECRET=*** \ | |
-e TOKEN_EXPIRATION_TIME=60000 \ | |
--name stacksaga-admin-server \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
stacksaga_admin_mysql: | |
container_name: stacksaga_admin_mysql | |
image: "stacksaga/stacksaga_admin_mysql:1.0.0" | |
ports: | |
- "4444:4444" | |
restart: always | |
environment: | |
- DB_URL=jdbc:mysql://host.docker.internal:3306/stacksaga_admin_db?createDatabaseIfNotExist=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mono.stacksaga.security.adapter.cloud; | |
import io.r2dbc.pool.ConnectionPool; | |
import io.r2dbc.pool.ConnectionPoolConfiguration; | |
import io.r2dbc.spi.ConnectionFactories; | |
import io.r2dbc.spi.ConnectionFactory; | |
import io.r2dbc.spi.ConnectionFactoryOptions; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mono.stacksaga.example.userservice.service; | |
import lombok.AllArgsConstructor; | |
import org.mono.stacksaga.example.userservice.entity.UserEntity; | |
import org.mono.stacksaga.example.userservice.repository.UserRepository; | |
import org.springframework.stereotype.Service; | |
import javax.transaction.Transactional; | |
import java.util.Optional; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mono.stacksaga.example.deliveryservice.controller; | |
import lombok.AllArgsConstructor; | |
import org.mono.stacksaga.example.deliveryservice.dto.StartDeliveryRequestBody; | |
import org.mono.stacksaga.example.deliveryservice.dto.StartDeliveryResponseBody; | |
import org.mono.stacksaga.example.deliveryservice.dto.StartDeliveryRevertRequestBody; | |
import org.mono.stacksaga.example.deliveryservice.dto.StartDeliveryRevertResponseBody; | |
import org.mono.stacksaga.example.deliveryservice.service.DeliveryDetailService; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; |
NewerOlder