https://github.com/spectolabs/spring-cloud-contract-blog
https://github.com/spectolabs/spring-cloud-contract-blog
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spectolabs/spring-cloud-contract-blog
- Owner: SpectoLabs
- Created: 2016-11-14T11:01:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T15:19:43.000Z (over 8 years ago)
- Last Synced: 2025-05-03T15:37:23.541Z (about 1 year ago)
- Language: Java
- Size: 61.5 KB
- Stars: 54
- Watchers: 4
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spring-cloud-contract-blog
Vanilla implementations for Account and Subscription microservices for demonstrating Consumer-Driven Contracts using Spring Cloud Contract
### Requirements
- Java
- [Spring Boot](https://projects.spring.io/spring-boot/)
- [Spring Cloud Contract](https://cloud.spring.io/spring-cloud-contract/)
- [Gradle](https://gradle.org/)
- [Maven](https://maven.apache.org/) for creating local maven repository
##### Install Maven
This project use local maven repository to share stubs file
```sh
# Mac OS
brew install maven
# Ubuntu
apt-get install maven
```
##### Install Gradle
```sh
# Mac OS
brew install gradle
# Ubuntu
apt-get install gradle
```
### Usage
Use Gradle to test, build and publish artifacts for local development.
##### subscription-service (consumer) tasks
* **test** - Runs the unit tests
* **build** - Test and assemble uber jar
##### account-service (producer) tasks
In addition to test and build, there are other tasks specific to the producer:
* **generateContractTests** - Generate API verification tests from the contracts
* **generateWireMockClientStubs** - Generate WireMock client stubs from the contracts
* **install** - Install artifacts including stubs.jar into the local Maven repository
* **uploadArchives** - Upload artifacts to remote repository
#### Links
More details can be found on the [blog](https://www.specto.io/blog/spring-cloud-contract.html).