Compare commits
18 Commits
spring-clo
...
spring-boo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
500ee0a04f | ||
|
|
4d67dd44d0 | ||
|
|
a4d70d5835 | ||
|
|
f2b83425ac | ||
|
|
f854262f80 | ||
|
|
11d70c0c12 | ||
|
|
4e26aa589e | ||
|
|
5d76ba1375 | ||
|
|
1d50d8f513 | ||
|
|
0e4b84b72e | ||
|
|
60de5fafac | ||
|
|
21b2bccbad | ||
|
|
f4a0addd24 | ||
|
|
a5e7696775 | ||
|
|
d68a99e92b | ||
|
|
3a6149b190 | ||
|
|
2c775cdaa2 | ||
|
|
387d9a5711 |
11
.idea/libraries/Gradle__org_projectlombok_lombok_1_16_20.xml
generated
Normal file
11
.idea/libraries/Gradle__org_projectlombok_lombok_1_16_20.xml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: org.projectlombok:lombok:1.16.20">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.16.20/ac76d9b956045631d1561a09289cbf472e077c01/lombok-1.16.20.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.16.20/69ebf81bb97bdb3c9581c171762bb4929cb5289c/lombok-1.16.20-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
13
.idea/modules/spring-boot-testing.iml
generated
Normal file
13
.idea/modules/spring-boot-testing.iml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="spring-boot-testing" external.linked.project.path="$MODULE_DIR$/../../spring-boot/spring-boot-testing" external.root.project.path="$MODULE_DIR$/../../spring-boot/spring-boot-testing" external.system.id="GRADLE" external.system.module.group="reflectoring.io" external.system.module.version="0.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/../../spring-boot/spring-boot-testing">
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../spring-boot/spring-boot-testing/.gradle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../spring-boot/spring-boot-testing/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/../../spring-boot/spring-boot-testing/out" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -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
|
||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
13
pact/pact-feign-consumer/README.md
Normal file
13
pact/pact-feign-consumer/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Testing a Spring Boot REST API Consumer against a Contract with Spring Cloud Contract
|
||||
|
||||
## Companion Blog Article
|
||||
Read the [companion blog article](https://reflectoring.io/consumer-driven-contract-consumer-spring-cloud-contract/) to this repository.
|
||||
|
||||
## Getting Started
|
||||
|
||||
* have a look at the [contract](/src/test/resources/contracts)
|
||||
* 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/UserClientTest.java)
|
||||
* run `./gradlew publishToMavenLocal` in the [producer project](../spring-cloud-contract-provider)
|
||||
to create a provider stubs
|
||||
* run `./gradlew build` in this project to verify the feign client against the stub
|
||||
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
|
||||
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')
|
||||
testCompile("au.com.dius:pact-jvm-consumer-junit_2.11:3.5.2")
|
||||
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