galovics commented on code in PR #4322:
URL: https://github.com/apache/fineract/pull/4322#discussion_r1952773948
##########
custom/acme/loan/job/src/main/java/com/acme/fineract/loan/job/AcmeNoopJobConfiguration.java:
##########
@@ -24,20 +24,23 @@
import org.springframework.batch.core.launch.support.RunIdIncrementer;
import org.springframework.batch.core.repository.JobRepository;
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.Configuration;
import org.springframework.transaction.PlatformTransactionManager;
@Configuration
public class AcmeNoopJobConfiguration {
- @Autowired
- private JobRepository jobRepository;
- @Autowired
- private PlatformTransactionManager transactionManager;
- @Autowired
- private AcmeNoopJobTasklet tasklet;
+ private final JobRepository jobRepository;
+ private final PlatformTransactionManager transactionManager;
+ private final AcmeNoopJobTasklet tasklet;
+
+ public AcmeNoopJobConfiguration(JobRepository jobRepository,
PlatformTransactionManager transactionManager,
Review Comment:
You can use Lombok's `@RequiredArgsConstructor` instead of actually writing
the code for the constructor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]