Compare commits

..

18 Commits

Author SHA1 Message Date
Tom Hombergs
500ee0a04f ignored test because it cannot run on CI 2018-05-27 21:55:26 +02:00
Tom Hombergs
4d67dd44d0 fix 2018-05-27 21:10:15 +02:00
Tom Hombergs
a4d70d5835 Example application for structuring a Spring Boot app 2018-05-27 20:55:24 +02:00
Tom Hombergs
f2b83425ac inital checking for spring-boot-test example project 2018-05-20 20:38:28 +02:00
Tom Hombergs
f854262f80 changed package name 2018-03-18 22:44:54 +01:00
Tom Hombergs
11d70c0c12 pact feign consumer example 2018-03-17 12:58:11 +01:00
Tom Hombergs
4e26aa589e moved deprecated modules 2018-03-17 12:04:05 +01:00
Tom Hombergs
5d76ba1375 added example for modularizing a Spring Boot application 2018-02-01 23:32:01 +01:00
Tom Hombergs
1d50d8f513 ignoring offline cdc test 2018-01-18 22:48:20 +01:00
Tom Hombergs
0e4b84b72e polishing spring-cloud-contract consumer example 2018-01-18 22:19:42 +01:00
Tom Hombergs
60de5fafac Merge remote-tracking branch 'origin/master' 2018-01-17 21:45:54 +01:00
Tom Hombergs
21b2bccbad added spring cloud contract consumer example 2018-01-17 21:45:43 +01:00
Tom Hombergs
f4a0addd24 Update README.md 2018-01-15 16:40:22 +01:00
Tom Hombergs
a5e7696775 added pact contract 2018-01-13 12:53:21 +01:00
Tom Hombergs
d68a99e92b polishing and readme 2018-01-10 00:09:05 +01:00
Tom Hombergs
3a6149b190 added links to blog posts 2018-01-08 22:51:48 +01:00
Tom Hombergs
2c775cdaa2 refactored gradle project structure 2018-01-08 22:32:55 +01:00
Tom Hombergs
387d9a5711 Merge pull request #5 from thombergs/spring-cloud-contract
added example with spring cloud contract
2018-01-08 22:05:48 +01:00
307 changed files with 2545 additions and 36 deletions

View 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
View 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>

View File

@@ -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

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View 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

View File

@@ -0,0 +1,5 @@
userservice:
ribbon:
eureka:
enabled: false
listOfServers: localhost:8080

View 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}")
}

View 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