Renamed properties to better be grouped in YAML

Updated Unit tests to pass
This commit is contained in:
Michael Minella
2016-06-27 17:20:22 -05:00
committed by Glenn Renfro
parent 5393962685
commit 8aa02da2cd
3 changed files with 21 additions and 21 deletions

View File

@@ -170,11 +170,11 @@ To disable a specific batch event use the following configuration:
`spring.cloud.task.events.<batch event listener>.enabled=false`:
```
spring.cloud.task.events.job.execution.listener.enabled=false
spring.cloud.task.events.step.execution.listener.enabled=false
spring.cloud.task.events.chunk.listener.enabled=false
spring.cloud.task.events.item.read.listener.enabled=false
spring.cloud.task.events.item.write.listener.enabled=false
spring.cloud.task.events.item.process.listener.enabled=false
spring.cloud.task.events.skip.listener.enabled=false
spring.cloud.task.batch.events.job-execution.enabled=false
spring.cloud.task.batch.events.step-execution.enabled=false
spring.cloud.task.batch.events.chunk.enabled=false
spring.cloud.task.batch.events.item-read.enabled=false
spring.cloud.task.batch.events.item-process.enabled=false
spring.cloud.task.batch.events.item-write.enabled=false
spring.cloud.task.batch.events.skip.enabled=false
```

View File

@@ -82,20 +82,20 @@ public class BatchEventAutoConfiguration {
@Bean
@Lazy
@ConditionalOnProperty(prefix = "spring.cloud.task.events.job.execution.listener", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.job-execution", name = "enabled", havingValue = "true", matchIfMissing = true)
public JobExecutionListener jobExecutionEventsListener() {
return new EventEmittingJobExecutionListener(listenerChannels.jobExecutionEvents());
}
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.events.step.execution.listener", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.step-execution", name = "enabled", havingValue = "true", matchIfMissing = true)
public StepExecutionListener stepExecutionEventsListener() {
return new EventEmittingStepExecutionListener(listenerChannels.stepExecutionEvents());
}
@Bean
@Lazy
@ConditionalOnProperty(prefix = "spring.cloud.task.events.chunk.events.listener", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.chunk", name = "enabled", havingValue = "true", matchIfMissing = true)
public GatewayProxyFactoryBean chunkEventsListener() {
GatewayProxyFactoryBean factoryBean =
new GatewayProxyFactoryBean(ChunkListener.class);
@@ -106,25 +106,25 @@ public class BatchEventAutoConfiguration {
}
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.events.item.read.events.listener", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.item-read", name = "enabled", havingValue = "true", matchIfMissing = true)
public ItemReadListener itemReadEventsListener() {
return new EventEmittingItemReadListener(listenerChannels.itemReadEvents());
}
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.events.item.write.events.listener", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.item-write", name = "enabled", havingValue = "true", matchIfMissing = true)
public ItemWriteListener itemWriteEventsListener() {
return new EventEmittingItemWriteListener(listenerChannels.itemWriteEvents());
}
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.events.item.process.events.listener", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.item-process", name = "enabled", havingValue = "true", matchIfMissing = true)
public ItemProcessListener itemProcessEventsListener() {
return new EventEmittingItemProcessListener(listenerChannels.itemProcessEvents());
}
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.events.skip.events.listener", name = "enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.skip", name = "enabled", havingValue = "true", matchIfMissing = true)
public SkipListener skipEventsListener() {
return new EventEmittingSkipListener(listenerChannels.skipEvents());
}

View File

@@ -138,43 +138,43 @@ public class EventJobExecutionTests {
@Test
public void testDisabledJobExecutionListener() {
testDisabledConfiguration("spring.cloud.task.events.job.execution.listener.enabled",
testDisabledConfiguration("spring.cloud.task.batch.events.job-execution.enabled",
BatchEventAutoConfiguration.JOB_EXECUTION_EVENTS_LISTENER);
}
@Test
public void testDisabledStepExecutionListener() {
testDisabledConfiguration("spring.cloud.task.events.step.execution.listener.enabled",
testDisabledConfiguration("spring.cloud.task.batch.events.step-execution.enabled",
BatchEventAutoConfiguration.STEP_EXECUTION_EVENTS_LISTENER);
}
@Test
public void testDisabledChunkListener() {
testDisabledConfiguration("spring.cloud.task.events.chunk.events.listener.enabled",
testDisabledConfiguration("spring.cloud.task.batch.events.chunk.enabled",
BatchEventAutoConfiguration.CHUNK_EVENTS_LISTENER);
}
@Test
public void testDisabledItemReadListener() {
testDisabledConfiguration("spring.cloud.task.events.item.read.events.listener.enabled",
testDisabledConfiguration("spring.cloud.task.batch.events.item-read.enabled",
BatchEventAutoConfiguration.ITEM_READ_EVENTS_LISTENER);
}
@Test
public void testDisabledItemWriteListener() {
testDisabledConfiguration("spring.cloud.task.events.item.write.events.listener.enabled",
testDisabledConfiguration("spring.cloud.task.batch.events.item-write.enabled",
BatchEventAutoConfiguration.ITEM_WRITE_EVENTS_LISTENER);
}
@Test
public void testDisabledItemProcessListener() {
testDisabledConfiguration("spring.cloud.task.events.item.process.events.listener.enabled",
testDisabledConfiguration("spring.cloud.task.batch.events.item-process.enabled",
BatchEventAutoConfiguration.ITEM_PROCESS_EVENTS_LISTENER);
}
@Test
public void testDisabledSkipEventListener() {
testDisabledConfiguration("spring.cloud.task.events.skip.events.listener.enabled",
testDisabledConfiguration("spring.cloud.task.batch.events.skip.enabled",
BatchEventAutoConfiguration.SKIP_EVENTS_LISTENER);
}