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

The following examples show how to use org.springframework.boot.autoconfigure.batch.BatchProperties. 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
Source File: TaskJobLauncherCommandLineRunnerFactoryBean.java    From spring-cloud-task with Apache License 2.0 6 votes vote down vote up
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
Source File: TaskJobLauncherAutoConfiguration.java    From spring-cloud-task with Apache License 2.0 5 votes vote down vote up
@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
Source File: ComposedTaskRunnerConfiguration.java    From composed-task-runner with Apache License 2.0 4 votes vote down vote up
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example #4
Source File: ComposedTaskRunnerConfiguration.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new org.springframework.cloud.dataflow.composedtaskrunner.ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example #5
Source File: JobDependencies.java    From spring-cloud-dataflow with 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
Source File: ComposedBatchConfigurer.java    From composed-task-runner with Apache License 2.0 2 votes vote down vote up
/**
 * 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
Source File: ComposedBatchConfigurer.java    From spring-cloud-dataflow with Apache License 2.0 2 votes vote down vote up
/**
 * 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);
}