VictorPavfurious commented on code in PR #4353:
URL: https://github.com/apache/fineract/pull/4353#discussion_r1969214218


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformServiceImpl.java:
##########
@@ -52,28 +54,22 @@
 import org.springframework.stereotype.Service;
 
 @Service
+@RequiredArgsConstructor
 public class SmsCampaignReadPlatformServiceImpl implements 
SmsCampaignReadPlatformService {
 
-    private final BusinessRuleMapper businessRuleMapper;
     private final JdbcTemplate jdbcTemplate;
     private final DatabaseSpecificSQLGenerator sqlGenerator;
     private final SmsCampaignDropdownReadPlatformService 
smsCampaignDropdownReadPlatformService;
-    private final SmsCampaignMapper smsCampaignMapper;
     private final CalendarDropdownReadPlatformService 
calendarDropdownReadPlatformService;
     private final PaginationHelper paginationHelper;
+    private final SqlValidator sqlValidator;
+    private BusinessRuleMapper businessRuleMapper;
+    private SmsCampaignMapper smsCampaignMapper;
 
-    @Autowired
-    public SmsCampaignReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate,
-            SmsCampaignDropdownReadPlatformService 
smsCampaignDropdownReadPlatformService,
-            final CalendarDropdownReadPlatformService 
calendarDropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator,
-            PaginationHelper paginationHelper) {
-        this.jdbcTemplate = jdbcTemplate;
-        this.sqlGenerator = sqlGenerator;
+    @PostConstruct
+    public void init() {
         this.businessRuleMapper = new BusinessRuleMapper(sqlGenerator);

Review Comment:
   @adamsaghy what do you think about make this SmsCampaignMapper and 
BusinessRuleMapper like bean Component and inject via construct with using DI?
    I think it will be better 



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