org.springframework.cloud.contract.stubrunner.StubFinder Java Examples

The following examples show how to use org.springframework.cloud.contract.stubrunner.StubFinder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StubRunnerDiscoveryClient.java    From spring-cloud-contract with Apache License 2.0 5 votes vote down vote up
StubRunnerDiscoveryClient(DiscoveryClient delegate, StubFinder stubFinder,
		StubMapperProperties stubMapperProperties, String springAppName) {
	this.delegate = delegate instanceof StubRunnerDiscoveryClient
			? noOpDiscoveryClient() : delegate;
	if (log.isDebugEnabled()) {
		log.debug("Will delegate calls to discovery service [" + this.delegate
				+ "] if a stub is not found");
	}
	this.stubFinder = stubFinder;
	this.stubMapperProperties = stubMapperProperties;
}
 
Example #2
Source File: StubRunnerDiscoveryClient.java    From spring-cloud-contract with Apache License 2.0 5 votes vote down vote up
StubRunnerDiscoveryClient(StubFinder stubFinder,
		StubMapperProperties stubMapperProperties, String springAppName) {
	this.delegate = noOpDiscoveryClient();
	if (log.isDebugEnabled()) {
		log.debug("Will delegate calls to discovery service [" + this.delegate
				+ "] if a stub is not found");
	}
	this.stubFinder = stubFinder;
	this.stubMapperProperties = stubMapperProperties;
}
 
Example #3
Source File: StubRunnerSpringCloudAutoConfiguration.java    From spring-cloud-contract with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean(DiscoveryClient.class)
@ConditionalOnStubbedDiscoveryEnabled
@ConditionalOnProperty(value = "stubrunner.cloud.delegate.enabled",
		havingValue = "false", matchIfMissing = true)
public DiscoveryClient noOpStubRunnerDiscoveryClient(StubFinder stubFinder,
		StubMapperProperties stubMapperProperties,
		@Value("${spring.application.name:unknown}") String springAppName) {
	return new StubRunnerDiscoveryClient(stubFinder, stubMapperProperties,
			springAppName);
}
 
Example #4
Source File: StubRunnerSpringCloudAutoConfiguration.java    From spring-cloud-contract with Apache License 2.0 4 votes vote down vote up
StubFinder stubFinder() {
	if (this.stubFinder == null) {
		this.stubFinder = this.beanFactory.getBean(StubFinder.class);
	}
	return this.stubFinder;
}
 
Example #5
Source File: SpringCloudLoadBalancerAutoConfiguration.java    From spring-cloud-contract with Apache License 2.0 4 votes vote down vote up
private StubFinder stubFinder() {
	if (this.stubFinder == null) {
		this.stubFinder = this.beanFactory.getBean(StubFinder.class);
	}
	return this.stubFinder;
}
 
Example #6
Source File: SpringCloudLoadBalancerAutoConfiguration.java    From spring-cloud-contract with Apache License 2.0 4 votes vote down vote up
StubbedServiceInstance(StubFinder stubFinder,
		StubMapperProperties stubMapperProperties, String serviceId) {
	this.stubFinder = stubFinder;
	this.stubMapperProperties = stubMapperProperties;
	this.serviceId = serviceId;
}
 
Example #7
Source File: TriggerController.java    From spring-cloud-contract with Apache License 2.0 4 votes vote down vote up
@Autowired
public TriggerController(StubFinder stubFinder) {
	this.stubFinder = stubFinder;
}