Fixed names for flow registrars

This commit is contained in:
Marcin Grzejszczak
2016-04-25 16:20:59 +02:00
parent 50dc90df76
commit c1ca81154f
2 changed files with 2 additions and 6 deletions

View File

@@ -13,7 +13,6 @@ import org.springframework.integration.dsl.GenericEndpointSpec
import org.springframework.integration.dsl.IntegrationFlowBuilder
import org.springframework.integration.dsl.IntegrationFlows
import org.springframework.messaging.Message
import org.springframework.stereotype.Service
/**
* Spring Integration configuration that iterates over the downloaded Groovy DSLs
* and registers a flow for each DSL.
@@ -25,7 +24,7 @@ import org.springframework.stereotype.Service
class StubRunnerIntegrationConfiguration {
@Bean
FlowRegistrar service(AutowireCapableBeanFactory beanFactory, BatchStubRunner batchStubRunner) {
FlowRegistrar flowRegistrar(AutowireCapableBeanFactory beanFactory, BatchStubRunner batchStubRunner) {
Map<StubConfiguration, Collection<GroovyDsl>> accurestContracts = batchStubRunner.accurestContracts
accurestContracts.each { StubConfiguration key, Collection<GroovyDsl> value ->
String name = "${key.groupId}_${key.artifactId}"
@@ -52,6 +51,5 @@ class StubRunnerIntegrationConfiguration {
void handle(Message message) {}
}
@Service
static class FlowRegistrar {}
}

View File

@@ -16,7 +16,6 @@ import org.springframework.integration.dsl.IntegrationFlowBuilder
import org.springframework.integration.dsl.IntegrationFlows
import org.springframework.messaging.Message
import org.springframework.messaging.MessageChannel
import org.springframework.stereotype.Service
/**
* Spring Cloud Stream configuration that iterates over the downloaded Groovy DSLs
* and registers a flow for each DSL.
@@ -29,7 +28,7 @@ import org.springframework.stereotype.Service
class StubRunnerStreamConfiguration {
@Bean
FlowRegistrar service(AutowireCapableBeanFactory beanFactory, BatchStubRunner batchStubRunner, ChannelBindingService channelBindingService) {
FlowRegistrar flowRegistrar(AutowireCapableBeanFactory beanFactory, BatchStubRunner batchStubRunner, ChannelBindingService channelBindingService) {
Map<StubConfiguration, Collection<GroovyDsl>> accurestContracts = batchStubRunner.accurestContracts
accurestContracts.each { StubConfiguration key, Collection<GroovyDsl> value ->
String name = "${key.groupId}_${key.artifactId}"
@@ -60,6 +59,5 @@ class StubRunnerStreamConfiguration {
void handle(Message message) {}
}
@Service
static class FlowRegistrar {}
}