Class ClasspathStubProvider
- java.lang.Object
-
- org.springframework.cloud.contract.stubrunner.ClasspathStubProvider
-
- All Implemented Interfaces:
StubDownloaderBuilder,org.springframework.core.io.ProtocolResolver
public class ClasspathStubProvider extends Object implements StubDownloaderBuilder
Stub downloader that picks stubs and contracts from the provided resource. IfStubRunnerProperties.stubsModeis set toStubRunnerProperties.StubsMode.CLASSPATHthen classpath is searched according to what has been passed inStubRunnerProperties.ids. The pattern to search for stubs looks like thisMETA-INF/group.id/artifactid/ ** /*.*contracts/group.id/artifactid/ ** /*.*mappings/group.id/artifactid/ ** /*.*
META-INF/com.example/fooservice/1.0.0/ **contracts/com.example/artifactid/ ** /*.*mappings/com.example/artifactid/ ** /*.*
- Since:
- 1.1.1
- Author:
- Marcin Grzejszczak
-
-
Constructor Summary
Constructors Constructor Description ClasspathStubProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StubDownloaderbuild(StubRunnerOptions stubRunnerOptions)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.cloud.contract.stubrunner.StubDownloaderBuilder
resolve
-
-
-
-
Method Detail
-
build
public StubDownloader build(StubRunnerOptions stubRunnerOptions)
- Specified by:
buildin interfaceStubDownloaderBuilder- Parameters:
stubRunnerOptions- options of Stub Runner- Returns:
StubDownloaderinstance ofnullif current parameters don't allow building the instance
-
-