Skip to content

Commit d68a99e

Browse files
committed
polishing and readme
1 parent 3a6149b commit d68a99e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Testing a Spring Boot REST API against a Contract with Spring Cloud Contract
2+
3+
## Companion Blog Article
4+
Read the [companion blog article](https://reflectoring.io/consumer-driven-contract-provider-spring-cloud-contract/) to this repository.
5+
6+
## Getting Started
7+
8+
* have a look at the [contract](/src/test/resources/contracts)
9+
* have a look at the [controller](/src/main/java/io/reflectoring/UserController.java)
10+
* run `./gradlew generateContractTests` to generate JUnit tests that validate the controller against the contract
11+
* run `./gradlew build` to generate and run the tests

spring-cloud/spring-cloud-contract-provider/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
apply plugin: 'spring-cloud-contract'
2+
13
buildscript {
24
repositories {
35
mavenCentral()
@@ -13,8 +15,6 @@ buildscript {
1315
}
1416
}
1517

16-
apply plugin: 'groovy'
17-
apply plugin: 'spring-cloud-contract'
1818

1919
repositories {
2020
mavenCentral()

0 commit comments

Comments
 (0)