Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Repo containing an example of a simple setup of Stub Runner Boot

License

Notifications You must be signed in to change notification settings

spring-attic/stub-runner-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

stub-runner-boot is no longer actively maintained by VMware, Inc.

Stub Runner Boot

This is an example of a fully setup stub runner boot application that needs to have the following properties setup

stubrunner:
  # artifact ids containing stubs to be downloaded
  ids: com.example.groupid:artifactid:version:classifier:port
  # url of where the stubs reside
  repositoryRoot: http://localhost:8081/artifactory/libs-release-local

Then when you start the application the stubs will be downloaded and http server stubs will be started for you.

FAQ

Startup exceptions

Q: I’m running the application and get. Why?

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.contract.stubrunner.server.HttpStubsController': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'batchStubRunner' defined in org.springframework.cloud.contract.stubrunner.spring.StubRunnerConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.contract.stubrunner.BatchStubRunner]: Factory method 'batchStubRunner' threw exception; nested exception is java.lang.IllegalStateException: Remote repositories for stubs are not specified and work offline flag wasn't passed
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.5.RELEASE.jar!/:4.3.5.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) ~[spring-beans-4.3.5.RELEASE.jar!/:4.3.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1154) ~[spring-beans-4.3.5.RELEASE.jar!/:4.3.5.RELEASE]

A: You haven’t set up the stubrunner.repositoryRoot. You need to pass it to download the stubs from a repo. If you want to use the stubs installed locally just turn stubRunner.workOffline flag to true.

About

Repo containing an example of a simple setup of Stub Runner Boot

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages