Update so that it can be natively compiled by Spring Native 0.11
This commit is contained in:
@@ -43,7 +43,7 @@ import org.springframework.util.Assert;
|
||||
* @author Michael Minella
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(SingleStepJobProperties.class)
|
||||
@AutoConfigureBefore(BatchAutoConfiguration.class)
|
||||
public class SingleStepJobAutoConfiguration {
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Glenn Renfro
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(FlatFileItemReaderProperties.class)
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
public class FlatFileItemReaderAutoConfiguration {
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Michael Minella
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(FlatFileItemWriterProperties.class)
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
public class FlatFileItemWriterAutoConfiguration {
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Michael Minella
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(JdbcBatchItemWriterProperties.class)
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
public class JdbcBatchItemWriterAutoConfiguration {
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.jdbc.core.RowMapper;
|
||||
* @author Glenn Renfro
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(JdbcCursorItemReaderProperties.class)
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "spring.batch.job.jdbccursoritemreader", name = "name")
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Michael Minella
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties({ KafkaProperties.class, KafkaItemReaderProperties.class })
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
public class KafkaItemReaderAutoConfiguration {
|
||||
|
||||
@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
|
||||
* @author Michael Minella
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties({ KafkaProperties.class, KafkaItemWriterProperties.class })
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
public class KafkaItemWriterAutoConfiguration {
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Michael Minella
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(AmqpItemReaderProperties.class)
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
@ConditionalOnProperty(name = "spring.batch.job.amqpitemreader.enabled",
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Michael Minella
|
||||
* @since 2.3
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(AmqpItemWriterProperties.class)
|
||||
@AutoConfigureAfter(BatchAutoConfiguration.class)
|
||||
@ConditionalOnProperty(name = "spring.batch.job.amqpitemwriter.enabled",
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
*
|
||||
* @author Michael Minella
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean({ Job.class })
|
||||
@ConditionalOnProperty(
|
||||
name = { "spring.cloud.task.batch.listener.enable",
|
||||
@@ -55,7 +55,7 @@ public class TaskBatchAutoConfiguration {
|
||||
/**
|
||||
* Auto configuration for {@link TaskBatchExecutionListener}.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnMissingBean(name = "taskBatchExecutionListener")
|
||||
@EnableConfigurationProperties(TaskProperties.class)
|
||||
public static class TaskBatchExecutionListenerAutoconfiguration {
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
*
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Conditional(JobLaunchCondition.class)
|
||||
@EnableConfigurationProperties(TaskBatchProperties.class)
|
||||
@AutoConfigureBefore(BatchAutoConfiguration.class)
|
||||
|
||||
@@ -66,7 +66,7 @@ public class PrefixTests {
|
||||
assertThat(jobIds.contains(1L));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableBatchProcessing
|
||||
@TaskBatchTest
|
||||
@EnableTask
|
||||
|
||||
@@ -50,7 +50,7 @@ import org.springframework.util.CollectionUtils;
|
||||
* @author Glenn Renfro
|
||||
* @author Michael Minella
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableTransactionManagement
|
||||
@EnableConfigurationProperties({ TaskProperties.class })
|
||||
// @checkstyle:off
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.integration.support.locks.PassThruLockRegistry;
|
||||
*/
|
||||
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(prefix = "spring.cloud.task", name = "single-instance-enabled",
|
||||
havingValue = "true")
|
||||
public class SingleTaskConfiguration {
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Michael Minella
|
||||
* @since 2.1
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class TaskLifecycleConfiguration {
|
||||
|
||||
protected static final Log logger = LogFactory
|
||||
@@ -67,7 +67,6 @@ public class TaskLifecycleConfiguration {
|
||||
ConfigurableApplicationContext context, TaskRepository taskRepository,
|
||||
TaskExplorer taskExplorer, TaskNameResolver taskNameResolver,
|
||||
ObjectProvider<ApplicationArguments> applicationArguments) {
|
||||
|
||||
this.taskProperties = taskProperties;
|
||||
this.context = context;
|
||||
this.taskRepository = taskRepository;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BatchEventsApplication {
|
||||
SpringApplication.run(BatchEventsApplication.class, args);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public static class JobConfiguration {
|
||||
|
||||
private static final int DEFAULT_CHUNK_COUNT = 3;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class BatchEventsApplicationTests {
|
||||
|
||||
@EnableBinding(Sink.class)
|
||||
@PropertySource("classpath:io/spring/task/listener/job-listener-sink-channel.properties")
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public static class JobExecutionListenerBinding {
|
||||
|
||||
@StreamListener(Sink.INPUT)
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* @author Michael Minella
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class JobConfiguration {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(JobConfiguration.class);
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
|
||||
* @author Michael Minella
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Profile("embedded")
|
||||
public class EmbeddedDataSourceConfiguration {
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
|
||||
* Creates two data sources that use external databases.
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Profile("external")
|
||||
public class ExternalDataSourceConfiguration {
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public class MultiDataSourcesExternalApplicationTests {
|
||||
.as("Unable to find update task message: " + output).isTrue();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public static class TaskLauncherConfiguration {
|
||||
|
||||
private static Server defaultServer;
|
||||
|
||||
@@ -57,7 +57,7 @@ import org.springframework.core.io.Resource;
|
||||
/**
|
||||
* @author Michael Minella
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class JobConfiguration {
|
||||
|
||||
private static final int GRID_SIZE = 4;
|
||||
|
||||
@@ -113,7 +113,7 @@ public class TaskPartitionerTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public static class TaskLauncherConfiguration {
|
||||
|
||||
@Bean(destroyMethod = "stop")
|
||||
|
||||
@@ -31,7 +31,7 @@ public class TaskEventsApplication {
|
||||
SpringApplication.run(TaskEventsApplication.class, args);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public static class TaskConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>io.spring.cloud</groupId>
|
||||
<artifactId>tasksink</artifactId>
|
||||
<version>2.3.1-SNAPSHOT</version>
|
||||
<version>2.4.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Task Sink Sample Application</name>
|
||||
|
||||
@@ -25,7 +25,7 @@ import static org.mockito.Mockito.mock;
|
||||
/**
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class TaskSinkConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -70,7 +70,7 @@ public class TimestampTaskPropertiesTests {
|
||||
.isEqualTo(FORMAT);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableConfigurationProperties(TimestampTaskProperties.class)
|
||||
static class Conf {
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ import org.springframework.messaging.MessageChannel;
|
||||
* @author Glenn Renfro
|
||||
* @author Ali Shahbour
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(Job.class)
|
||||
@ConditionalOnBean({ Job.class, TaskLifecycleListener.class })
|
||||
// @checkstyle:off
|
||||
@@ -177,7 +177,7 @@ public class BatchEventAutoConfiguration {
|
||||
/**
|
||||
* Configuration for Job Execution Listener.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(EnableBinding.class)
|
||||
@EnableBinding(BatchEventsChannels.class)
|
||||
@EnableConfigurationProperties(TaskEventProperties.class)
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.messaging.MessageChannel;
|
||||
/**
|
||||
* @author Michael Minella
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnClass(EnableBinding.class)
|
||||
@ConditionalOnBean(TaskLifecycleListener.class)
|
||||
// @checkstyle:off
|
||||
@@ -64,7 +64,7 @@ public class TaskEventAutoConfiguration {
|
||||
/**
|
||||
* Configuration for a {@link TaskExecutionListener}.
|
||||
*/
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableBinding(TaskEventChannels.class)
|
||||
public static class ListenerConfiguration {
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ public class JobExecutionEventTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public static class EventJobExecutionConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class TaskBatchEventListenerBeanPostProcessorTests {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableAutoConfiguration
|
||||
public static class TestConfiguration {
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class TaskLaunchConfigurationExistingTests {
|
||||
assertThat(taskLauncher).isEqualTo(testTaskLauncher);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
protected static class TestTaskDeployerConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class TaskConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user