Compare commits
15 Commits
spring-clo
...
pact-feign
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8fa325ae0 | ||
|
|
fceb1d898d | ||
|
|
11d70c0c12 | ||
|
|
4e26aa589e | ||
|
|
5d76ba1375 | ||
|
|
1d50d8f513 | ||
|
|
0e4b84b72e | ||
|
|
60de5fafac | ||
|
|
21b2bccbad | ||
|
|
f4a0addd24 | ||
|
|
a5e7696775 | ||
|
|
d68a99e92b | ||
|
|
3a6149b190 | ||
|
|
2c775cdaa2 | ||
|
|
387d9a5711 |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
11
pact/pact-feign-consumer/README.md
Normal file
11
pact/pact-feign-consumer/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Creating a Consumer-Driven Contract with Feign and Pact
|
||||
|
||||
## Companion Blog Article
|
||||
Read the [companion blog article](https://reflectoring.io/consumer-driven-contract-feign-pact/) to this repository.
|
||||
|
||||
## Getting Started
|
||||
|
||||
* have a look at the [feign client](/src/main/java/io/reflectoring/UserClient.java)
|
||||
* have a look at the [consumer test](/src/test/java/io/reflectoring/UserServiceConsumerTest.java)
|
||||
* run `./gradlew build` to run all tests and create pact files into the folder `target/pacts`
|
||||
* run `./gradlew pactPublish` to publish the pact files to a Pact Broker (must specify Pact Broker location and credentials in `build.gradle`)
|
||||
5
pact/pact-feign-consumer/application.yml
Normal file
5
pact/pact-feign-consumer/application.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
userservice:
|
||||
ribbon:
|
||||
eureka:
|
||||
enabled: false
|
||||
listOfServers: localhost:8080
|
||||
41
pact/pact-feign-consumer/build.gradle
Normal file
41
pact/pact-feign-consumer/build.gradle
Normal file
@@ -0,0 +1,41 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springboot_version}"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "au.com.dius.pact" version "3.5.13"
|
||||
}
|
||||
|
||||
apply plugin: 'org.springframework.boot'
|
||||
|
||||
version '1.0.0.SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("org.springframework.boot:spring-boot-starter-data-jpa:${springboot_version}")
|
||||
compile("org.springframework.boot:spring-boot-starter-web:${springboot_version}")
|
||||
compile("org.springframework.cloud:spring-cloud-starter-feign:1.4.1.RELEASE")
|
||||
compile('com.h2database:h2:1.4.196')
|
||||
testCompile('org.codehaus.groovy:groovy-all:2.4.6')
|
||||
testCompile("au.com.dius:pact-jvm-consumer-junit_2.11:3.5.2")
|
||||
testCompile("org.springframework.boot:spring-boot-starter-test:${springboot_version}")
|
||||
}
|
||||
|
||||
pact {
|
||||
publish {
|
||||
pactDirectory = 'target/pacts'
|
||||
pactBrokerUrl = 'URL'
|
||||
pactBrokerUsername = 'USERNAME'
|
||||
pactBrokerPassword = 'PASSWORD'
|
||||
}
|
||||
}
|
||||
2
pact/pact-feign-consumer/gradle.properties
Normal file
2
pact/pact-feign-consumer/gradle.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
springboot_version=1.5.9.RELEASE
|
||||
verifier_version=1.2.2.RELEASE
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user