Merge branch '2.1.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
:branch: master
|
||||
:samples_branch: 2.0.x
|
||||
:samples_branch: 2.2.x
|
||||
|
||||
=== Stub Runner Core
|
||||
|
||||
|
||||
@@ -33,10 +33,8 @@ import org.springframework.context.Lifecycle;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.integration.dsl.FilterEndpointSpec;
|
||||
import org.springframework.integration.dsl.GenericEndpointSpec;
|
||||
import org.springframework.integration.dsl.IntegrationFlowBuilder;
|
||||
import org.springframework.integration.dsl.IntegrationFlows;
|
||||
import org.springframework.integration.transformer.MessageTransformingHandler;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
@@ -96,19 +94,11 @@ public class StubRunnerIntegrationConfiguration {
|
||||
}
|
||||
})
|
||||
.transform(
|
||||
new StubRunnerIntegrationTransformer(entries.getValue()),
|
||||
new Consumer<GenericEndpointSpec<MessageTransformingHandler>>() {
|
||||
@Override
|
||||
public void accept(
|
||||
GenericEndpointSpec<MessageTransformingHandler> e) {
|
||||
e.id(flowName + ".transformer");
|
||||
}
|
||||
})
|
||||
new StubRunnerIntegrationTransformer(entries.getValue()))
|
||||
.route(new StubRunnerIntegrationRouter(entries.getValue(),
|
||||
beanFactory));
|
||||
beanFactory.initializeBean(builder.get(), flowName);
|
||||
beanFactory.getBean(flowName + ".filter", Lifecycle.class).start();
|
||||
beanFactory.getBean(flowName + ".transformer", Lifecycle.class).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.Map;
|
||||
import org.springframework.cloud.contract.spec.Contract;
|
||||
import org.springframework.cloud.contract.spec.internal.FromFileProperty;
|
||||
import org.springframework.cloud.contract.verifier.util.BodyExtractor;
|
||||
import org.springframework.integration.transformer.GenericTransformer;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
@@ -33,8 +32,7 @@ import org.springframework.messaging.support.MessageBuilder;
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
class StubRunnerIntegrationTransformer
|
||||
implements GenericTransformer<Message<?>, Message<?>> {
|
||||
class StubRunnerIntegrationTransformer {
|
||||
|
||||
private final StubRunnerIntegrationMessageSelector selector;
|
||||
|
||||
@@ -46,7 +44,6 @@ class StubRunnerIntegrationTransformer
|
||||
this.selector = new StubRunnerIntegrationMessageSelector(groovyDsls);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message<?> transform(Message<?> source) {
|
||||
Contract groovyDsl = matchingContract(source);
|
||||
if (groovyDsl == null || groovyDsl.getOutputMessage() == null) {
|
||||
|
||||
@@ -43,10 +43,8 @@ import org.springframework.context.Lifecycle;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.integration.dsl.FilterEndpointSpec;
|
||||
import org.springframework.integration.dsl.GenericEndpointSpec;
|
||||
import org.springframework.integration.dsl.IntegrationFlowBuilder;
|
||||
import org.springframework.integration.dsl.IntegrationFlows;
|
||||
import org.springframework.integration.transformer.MessageTransformingHandler;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -59,8 +57,7 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ IntegrationFlows.class, EnableBinding.class })
|
||||
@ConditionalOnProperty(name = "stubrunner.stream.enabled", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "stubrunner.stream.enabled", havingValue = "true", matchIfMissing = true)
|
||||
@AutoConfigureBefore(StubRunnerIntegrationConfiguration.class)
|
||||
public class StubRunnerStreamConfiguration {
|
||||
|
||||
@@ -124,19 +121,11 @@ public class StubRunnerStreamConfiguration {
|
||||
e.id(flowName + ".filter");
|
||||
}
|
||||
})
|
||||
.transform(new StubRunnerStreamTransformer(entries.getValue()),
|
||||
new Consumer<GenericEndpointSpec<MessageTransformingHandler>>() {
|
||||
@Override
|
||||
public void accept(
|
||||
GenericEndpointSpec<MessageTransformingHandler> e) {
|
||||
e.id(flowName + ".transformer");
|
||||
}
|
||||
})
|
||||
.transform(new StubRunnerStreamTransformer(entries.getValue()))
|
||||
.route(new StubRunnerMessageRouter(entries.getValue(),
|
||||
beanFactory));
|
||||
beanFactory.initializeBean(builder.get(), flowName);
|
||||
beanFactory.getBean(flowName + ".filter", Lifecycle.class).start();
|
||||
beanFactory.getBean(flowName + ".transformer", Lifecycle.class).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.Map;
|
||||
import org.springframework.cloud.contract.spec.Contract;
|
||||
import org.springframework.cloud.contract.spec.internal.FromFileProperty;
|
||||
import org.springframework.cloud.contract.verifier.util.BodyExtractor;
|
||||
import org.springframework.integration.transformer.GenericTransformer;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
@@ -33,7 +32,7 @@ import org.springframework.messaging.support.MessageBuilder;
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
class StubRunnerStreamTransformer implements GenericTransformer<Message<?>, Message<?>> {
|
||||
class StubRunnerStreamTransformer {
|
||||
|
||||
private final StubRunnerStreamMessageSelector selector;
|
||||
|
||||
@@ -45,7 +44,6 @@ class StubRunnerStreamTransformer implements GenericTransformer<Message<?>, Mess
|
||||
this.selector = new StubRunnerStreamMessageSelector(groovyDsls);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Message<?> transform(Message<?> source) {
|
||||
Contract groovyDsl = matchingContract(source);
|
||||
if (groovyDsl == null || groovyDsl.getOutputMessage() == null) {
|
||||
|
||||
@@ -18,8 +18,10 @@ package org.springframework.cloud.contract.verifier.plugin
|
||||
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import spock.lang.Stepwise
|
||||
import spock.lang.Ignore
|
||||
|
||||
@Stepwise
|
||||
@Ignore("Flaky")
|
||||
class SampleJerseyProjectSpec extends ContractVerifierIntegrationSpec {
|
||||
|
||||
def setup() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
:samples_branch: 2.0.x
|
||||
:samples_branch: 2.2.x
|
||||
|
||||
= Spring Cloud Contract Maven Plugin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user