Spring Boot microservice to demo integration with Dapr for event-driven, Pact for consumer-driven contract testing, Cucumber BDD, Liquibase, etc.
A. Prerequisites
B. Getting Started & Run the Application
** Run Application on Local Docker Containers**
mvn clean install
docker-compose up --build
docker-compose down
dapr run --components-path ./dapr-components --app-id customer-service --app-port 9100 -- java -jar rest-controller/target/customer-service-0.0.1-SNAPSHOT-exec.jar -p 9100
C. Project Code Modules
config
- Spring Configuration classes for all of the modules.dapr-components
- dapr components files for pubsub.data
- Contains domain data shared with other applications such as rest-api, events etc.persistence
- Responsible for hosting the Entities and Repositories for the database.qa
- Integration/Functional Tests.rest-controller
- REST Endpoints for the application.service
- Contains business logic for the application.D. Application Launch
For testing purpose, we are using EMQ X MQTT public broker https://www.emqx.io/mqtt/public-mqtt5-broker.
To run Pact testing, please ensure to update the root pom's pact broker configuration (in placeholder currently) to your desired values.