FINERACT-2181: Refactor UpdateTrialBalanceDetailsConfig injection instead of Autowired
This commit is contained in:
committed by
Adam Saghy
parent
9d53d1cb90
commit
9fe993342b
+6
-9
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.apache.fineract.accounting.glaccount.jobs.updatetrialbalancedetails;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.accounting.glaccount.domain.TrialBalanceRepositoryWrapper;
|
||||
import org.apache.fineract.infrastructure.core.service.database.RoutingDataSourceServiceFactory;
|
||||
import org.apache.fineract.infrastructure.jobs.service.JobName;
|
||||
@@ -27,22 +28,18 @@ import org.springframework.batch.core.job.builder.JobBuilder;
|
||||
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
|
||||
@RequiredArgsConstructor
|
||||
public class UpdateTrialBalanceDetailsConfig {
|
||||
|
||||
@Autowired
|
||||
private JobRepository jobRepository;
|
||||
@Autowired
|
||||
private PlatformTransactionManager transactionManager;
|
||||
@Autowired
|
||||
private RoutingDataSourceServiceFactory dataSourceServiceFactory;
|
||||
@Autowired
|
||||
private TrialBalanceRepositoryWrapper trialBalanceRepositoryWrapper;
|
||||
private final JobRepository jobRepository;
|
||||
private final PlatformTransactionManager transactionManager;
|
||||
private final RoutingDataSourceServiceFactory dataSourceServiceFactory;
|
||||
private final TrialBalanceRepositoryWrapper trialBalanceRepositoryWrapper;
|
||||
|
||||
@Bean
|
||||
protected Step updateTrialBalanceDetailsStep() {
|
||||
|
||||
+3
-3
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.apache.fineract.test.api;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.client.services.BatchApiApi;
|
||||
import org.apache.fineract.client.services.BusinessDateManagementApi;
|
||||
import org.apache.fineract.client.services.BusinessStepConfigurationApi;
|
||||
@@ -56,15 +57,14 @@ import org.apache.fineract.client.services.SchedulerJobApi;
|
||||
import org.apache.fineract.client.services.UsersApi;
|
||||
import org.apache.fineract.client.util.FineractClient;
|
||||
import org.apache.fineract.test.stepdef.loan.LoanProductsCustomApi;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@RequiredArgsConstructor
|
||||
public class ApiConfiguration {
|
||||
|
||||
@Autowired
|
||||
private FineractClient fineractClient;
|
||||
private final FineractClient fineractClient;
|
||||
|
||||
@Bean
|
||||
public SchedulerApi schedulerApi() {
|
||||
|
||||
+3
-3
@@ -19,18 +19,18 @@
|
||||
package org.apache.fineract.test.api;
|
||||
|
||||
import java.time.Duration;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.fineract.client.util.FineractClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class FineractClientConfiguration {
|
||||
|
||||
@Autowired
|
||||
private ApiProperties apiProperties;
|
||||
private final ApiProperties apiProperties;
|
||||
|
||||
@Bean
|
||||
public FineractClient fineractClient() {
|
||||
|
||||
+4
-5
@@ -20,20 +20,19 @@ package org.apache.fineract.test.stepdef.hook;
|
||||
|
||||
import io.cucumber.java.After;
|
||||
import io.cucumber.java.Scenario;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.fineract.test.testrail.TestRailClient;
|
||||
import org.apache.fineract.test.testrail.TestRailProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class TestRailLifecycleHook {
|
||||
|
||||
@Autowired
|
||||
private TestRailProperties testRailProperties;
|
||||
private final TestRailProperties testRailProperties;
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext applicationContext;
|
||||
private final ApplicationContext applicationContext;
|
||||
|
||||
@After
|
||||
public void tearDown(Scenario scenario) {
|
||||
|
||||
+5
-7
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.loanaccount.jobs.addperiodicaccrualentries;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.infrastructure.jobs.service.JobName;
|
||||
import org.apache.fineract.portfolio.loanaccount.service.LoanAccrualsProcessingService;
|
||||
import org.springframework.batch.core.Job;
|
||||
@@ -26,20 +27,17 @@ import org.springframework.batch.core.job.builder.JobBuilder;
|
||||
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
|
||||
@RequiredArgsConstructor
|
||||
public class AddPeriodicAccrualEntriesConfig {
|
||||
|
||||
@Autowired
|
||||
private JobRepository jobRepository;
|
||||
@Autowired
|
||||
private PlatformTransactionManager transactionManager;
|
||||
@Autowired
|
||||
private LoanAccrualsProcessingService loanAccrualsProcessingService;
|
||||
private final JobRepository jobRepository;
|
||||
private final PlatformTransactionManager transactionManager;
|
||||
private final LoanAccrualsProcessingService loanAccrualsProcessingService;
|
||||
|
||||
@Bean
|
||||
protected Step addPeriodicAccrualEntriesStep() {
|
||||
|
||||
+5
-7
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsageing;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.infrastructure.jobs.service.JobName;
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.Step;
|
||||
@@ -25,21 +26,18 @@ import org.springframework.batch.core.job.builder.JobBuilder;
|
||||
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
|
||||
@RequiredArgsConstructor
|
||||
public class UpdateLoanArrearsAgeingConfig {
|
||||
|
||||
@Autowired
|
||||
private JobRepository jobRepository;
|
||||
@Autowired
|
||||
private PlatformTransactionManager transactionManager;
|
||||
private final JobRepository jobRepository;
|
||||
private final PlatformTransactionManager transactionManager;
|
||||
|
||||
@Autowired
|
||||
private LoanArrearsAgeingUpdateHandler updateLoanArrearsAgingService;
|
||||
private final LoanArrearsAgeingUpdateHandler updateLoanArrearsAgingService;
|
||||
|
||||
@Bean
|
||||
protected Step updateLoanArrearsAgeingStep() {
|
||||
|
||||
Reference in New Issue
Block a user