adamsaghy commented on code in PR #4172:
URL: https://github.com/apache/fineract/pull/4172#discussion_r1870933765


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/LoanAccountConfiguration.java:
##########
@@ -389,13 +408,47 @@ public ReplayedTransactionBusinessEventService 
replayedTransactionBusinessEventS
     @Bean
     @ConditionalOnMissingBean(LoanDownPaymentHandlerService.class)
     public LoanDownPaymentHandlerService 
loanDownPaymentHandlerService(LoanTransactionRepository 
loanTransactionRepository,
-            BusinessEventNotifierService businessEventNotifierService) {
-        return new 
LoanDownPaymentHandlerServiceImpl(loanTransactionRepository, 
businessEventNotifierService);
+            BusinessEventNotifierService businessEventNotifierService,
+            LoanDownPaymentTransactionValidator 
loanDownPaymentTransactionValidator, LoanScheduleService loanScheduleService,
+            LoanRefundService loanRefundService, LoanRefundValidator 
loanRefundValidator) {
+        return new 
LoanDownPaymentHandlerServiceImpl(loanTransactionRepository, 
businessEventNotifierService,
+                loanDownPaymentTransactionValidator, loanScheduleService, 
loanRefundService, loanRefundValidator);
     }
 
     @Bean
     @ConditionalOnMissingBean(LoanDisbursementDetailsAssembler.class)
     public LoanDisbursementDetailsAssembler 
loanDisbursementDetailsAssembler(FromJsonHelper fromApiJsonHelper) {
         return new LoanDisbursementDetailsAssembler(fromApiJsonHelper);
     }
+
+    @Bean
+    @ConditionalOnMissingBean(LoanDisbursementService.class)

Review Comment:
   I havent tried to apply directly these conditional on the component 
directly, so i am not sure is there any difference between the order when it 
got applied or how the override works in this case. The examples I have seen so 
far, was always using this annotations in @Configuration classes...
   
   I would say this might be something that should discuss outside of this PR 
and if using these annotations directly on the classes are causing no harm and 
not effect customization of the Fineract, we might can decide to refactor all 
of them and move away from the @Configuration classes...
   
   What do you think?



-- 
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]

Reply via email to