Java Code Examples for org.springframework.boot.autoconfigure.batch.BatchProperties

The following examples show how to use org.springframework.boot.autoconfigure.batch.BatchProperties. These examples are extracted from open source projects. 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
public TaskJobLauncherCommandLineRunnerFactoryBean(JobLauncher jobLauncher,
		JobExplorer jobExplorer, List<Job> jobs,
		TaskBatchProperties taskBatchProperties, JobRegistry jobRegistry,
		JobRepository jobRepository, BatchProperties batchProperties) {
	Assert.notNull(taskBatchProperties, "taskBatchProperties must not be null");
	Assert.notNull(batchProperties, "batchProperties must not be null");
	this.jobLauncher = jobLauncher;
	this.jobExplorer = jobExplorer;
	Assert.notEmpty(jobs, "jobs must not be null nor empty");
	this.jobs = jobs;
	this.jobNames = taskBatchProperties.getJobNames();
	this.jobRegistry = jobRegistry;
	this.taskBatchProperties = taskBatchProperties;
	if (StringUtils.hasText(batchProperties.getJob().getNames())) {
		this.jobNames = batchProperties.getJob().getNames();
	}
	else {
		this.jobNames = taskBatchProperties.getJobNames();
	}
	this.order = taskBatchProperties.getCommandLineRunnerOrder();
	this.jobRepository = jobRepository;
}
 
Example 2
@Bean
public TaskJobLauncherCommandLineRunnerFactoryBean jobLauncherCommandLineRunner(
		JobLauncher jobLauncher, JobExplorer jobExplorer, List<Job> jobs,
		JobRegistry jobRegistry, JobRepository jobRepository,
		BatchProperties batchProperties) {
	TaskJobLauncherCommandLineRunnerFactoryBean taskJobLauncherCommandLineRunnerFactoryBean;
	taskJobLauncherCommandLineRunnerFactoryBean = new TaskJobLauncherCommandLineRunnerFactoryBean(
			jobLauncher, jobExplorer, jobs, this.properties, jobRegistry,
			jobRepository, batchProperties);

	return taskJobLauncherCommandLineRunnerFactoryBean;
}
 
Example 3
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example 4
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new org.springframework.cloud.dataflow.composedtaskrunner.ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example 5
Source Project: spring-cloud-dataflow   Source File: JobDependencies.java    License: Apache License 2.0 4 votes vote down vote up
@Bean
public BatchDataSourceInitializer batchRepositoryInitializerForDefaultDBForServer(DataSource dataSource,
		ResourceLoader resourceLoader, BatchProperties properties) {
	return new BatchDataSourceInitializer(dataSource, resourceLoader, properties);
}
 
Example 6
/**
 * Create a new {@link BasicBatchConfigurer} instance.
 *
 * @param properties                    the batch properties
 * @param dataSource                    the underlying data source
 * @param transactionManagerCustomizers transaction manager customizers (or
 *                                      {@code null})
 */
protected ComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	super(properties, dataSource, transactionManagerCustomizers);
}
 
Example 7
/**
 * Create a new {@link BasicBatchConfigurer} instance.
 *
 * @param properties                    the batch properties
 * @param dataSource                    the underlying data source
 * @param transactionManagerCustomizers transaction manager customizers (or
 *                                      {@code null})
 */
protected ComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	super(properties, dataSource, transactionManagerCustomizers);
}