FINERACT-2081: Refactor constructor injection
This commit is contained in:
committed by
Adam Saghy
parent
af922fe933
commit
9a9a8ede93
+5
-7
@@ -18,26 +18,24 @@
|
|||||||
*/
|
*/
|
||||||
package com.acme.fineract.loan.job;
|
package com.acme.fineract.loan.job;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.batch.core.Job;
|
import org.springframework.batch.core.Job;
|
||||||
import org.springframework.batch.core.Step;
|
import org.springframework.batch.core.Step;
|
||||||
import org.springframework.batch.core.job.builder.JobBuilder;
|
import org.springframework.batch.core.job.builder.JobBuilder;
|
||||||
import org.springframework.batch.core.launch.support.RunIdIncrementer;
|
import org.springframework.batch.core.launch.support.RunIdIncrementer;
|
||||||
import org.springframework.batch.core.repository.JobRepository;
|
import org.springframework.batch.core.repository.JobRepository;
|
||||||
import org.springframework.batch.core.step.builder.StepBuilder;
|
import org.springframework.batch.core.step.builder.StepBuilder;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class AcmeNoopJobConfiguration {
|
public class AcmeNoopJobConfiguration {
|
||||||
|
|
||||||
@Autowired
|
private final JobRepository jobRepository;
|
||||||
private JobRepository jobRepository;
|
private final PlatformTransactionManager transactionManager;
|
||||||
@Autowired
|
private final AcmeNoopJobTasklet tasklet;
|
||||||
private PlatformTransactionManager transactionManager;
|
|
||||||
@Autowired
|
|
||||||
private AcmeNoopJobTasklet tasklet;
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
protected Step acmeNoopJobStep() {
|
protected Step acmeNoopJobStep() {
|
||||||
|
|||||||
Reference in New Issue
Block a user