Compare commits
20 Commits
spring-clo
...
pact-jvm-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8216c90168 | ||
|
|
fe9e15b813 | ||
|
|
9e66b87b18 | ||
|
|
9bae6d560a | ||
|
|
9d58b1323e | ||
|
|
612863cb2a | ||
|
|
f854262f80 | ||
|
|
11d70c0c12 | ||
|
|
4e26aa589e | ||
|
|
5d76ba1375 | ||
|
|
1d50d8f513 | ||
|
|
0e4b84b72e | ||
|
|
60de5fafac | ||
|
|
21b2bccbad | ||
|
|
f4a0addd24 | ||
|
|
a5e7696775 | ||
|
|
d68a99e92b | ||
|
|
3a6149b190 | ||
|
|
2c775cdaa2 | ||
|
|
387d9a5711 |
@@ -1,7 +0,0 @@
|
||||
spring.datasource.url=jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||
spring.datasource.driverClassName=org.h2.Driver
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=
|
||||
spring.h2.console.enabled=true
|
||||
|
||||
logging.level.org.hibernate.SQL=OFF
|
||||
0
pact/pact-angular/src/assets/.gitkeep
Normal file
0
pact/pact-angular/src/assets/.gitkeep
Normal file
|
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 @@
|
||||
# Testing a Spring Boot REST API Consumer against a Contract with Pact
|
||||
|
||||
## Companion Blog Article
|
||||
Read the [companion blog article](http://localhost:4000/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` in this project to create a pact and run the consumer test
|
||||
* afterwards, find the pact contract file in the folder `target/pacts`
|
||||
11
pact/pact-feign-consumer/application.yml
Normal file
11
pact/pact-feign-consumer/application.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
userservice:
|
||||
ribbon:
|
||||
eureka:
|
||||
enabled: false
|
||||
listOfServers: localhost:8080
|
||||
|
||||
rootservice:
|
||||
ribbon:
|
||||
eureka:
|
||||
enabled: false
|
||||
listOfServers: localhost:8080
|
||||
27
pact/pact-feign-consumer/build.gradle
Normal file
27
pact/pact-feign-consumer/build.gradle
Normal file
@@ -0,0 +1,27 @@
|
||||
apply plugin: 'org.springframework.boot'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springboot_version}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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')
|
||||
compile("au.com.dius:pact-jvm-consumer-junit_2.11:3.5.16")
|
||||
testCompile("org.springframework.boot:spring-boot-starter-test:${springboot_version}")
|
||||
}
|
||||
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