You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "MoMagdy14 (via GitHub)" <gi...@apache.org> on 2023/08/12 14:35:21 UTC
[GitHub] [fineract] MoMagdy14 opened a new pull request, #3374: Add custom AutoConfiguration class for tax service (FINERACT-1932)
MoMagdy14 opened a new pull request, #3374:
URL: https://github.com/apache/fineract/pull/3374
## Description
Describe the changes made and why they were made.
Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
## Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [x] Write the commit message as per https://github.com/apache/fineract/#pull-requests
- [x] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
- [x] Create/update unit or integration tests for verifying the changes made.
- [x] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
- [x] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
- [x] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] vidakovic commented on a diff in pull request #3374: Add custom AutoConfiguration class for tax service (FINERACT-1932)
Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #3374:
URL: https://github.com/apache/fineract/pull/3374#discussion_r1296892550
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxAutoConfiguration.java:
##########
@@ -0,0 +1,33 @@
+package org.apache.fineract.portfolio.tax.starter;
+
+import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService;
+import org.apache.fineract.portfolio.tax.domain.TaxComponentRepository;
+import org.apache.fineract.portfolio.tax.domain.TaxComponentRepositoryWrapper;
+import org.apache.fineract.portfolio.tax.domain.TaxGroupRepository;
+import org.apache.fineract.portfolio.tax.domain.TaxGroupRepositoryWrapper;
+import org.apache.fineract.portfolio.tax.serialization.TaxValidator;
+import org.apache.fineract.portfolio.tax.service.*;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+@Configuration
+public class TaxAutoConfiguration {
+
+ @Bean
+ @ConditionalOnMissingBean
Review Comment:
Please provide the Java interface class reference in parenthesis with the `@ConditionalOnMissingBean` annotation.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] MoMagdy14 commented on a diff in pull request #3374: FINERACT-1932: Add custom AutoConfiguration class for tax service
Posted by "MoMagdy14 (via GitHub)" <gi...@apache.org>.
MoMagdy14 commented on code in PR #3374:
URL: https://github.com/apache/fineract/pull/3374#discussion_r1298228113
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxAutoConfiguration.java:
##########
@@ -0,0 +1,33 @@
+package org.apache.fineract.portfolio.tax.starter;
+
+import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService;
+import org.apache.fineract.portfolio.tax.domain.TaxComponentRepository;
+import org.apache.fineract.portfolio.tax.domain.TaxComponentRepositoryWrapper;
+import org.apache.fineract.portfolio.tax.domain.TaxGroupRepository;
+import org.apache.fineract.portfolio.tax.domain.TaxGroupRepositoryWrapper;
+import org.apache.fineract.portfolio.tax.serialization.TaxValidator;
+import org.apache.fineract.portfolio.tax.service.*;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+@Configuration
+public class TaxAutoConfiguration {
+
+ @Bean
+ @ConditionalOnMissingBean
+ public TaxReadPlatformService taxReadPlatformService(JdbcTemplate jdbcTemplate,
+ AccountingDropdownReadPlatformService accountingDropdownReadPlatformService) {
+ return new TaxReadPlatformServiceImpl(jdbcTemplate, accountingDropdownReadPlatformService);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
Review Comment:
done, Updated
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] vidakovic commented on a diff in pull request #3374: Add custom AutoConfiguration class for tax service (FINERACT-1932)
Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #3374:
URL: https://github.com/apache/fineract/pull/3374#discussion_r1296892723
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxAutoConfiguration.java:
##########
@@ -0,0 +1,33 @@
+package org.apache.fineract.portfolio.tax.starter;
+
+import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService;
+import org.apache.fineract.portfolio.tax.domain.TaxComponentRepository;
+import org.apache.fineract.portfolio.tax.domain.TaxComponentRepositoryWrapper;
+import org.apache.fineract.portfolio.tax.domain.TaxGroupRepository;
+import org.apache.fineract.portfolio.tax.domain.TaxGroupRepositoryWrapper;
+import org.apache.fineract.portfolio.tax.serialization.TaxValidator;
+import org.apache.fineract.portfolio.tax.service.*;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+@Configuration
+public class TaxAutoConfiguration {
+
+ @Bean
+ @ConditionalOnMissingBean
+ public TaxReadPlatformService taxReadPlatformService(JdbcTemplate jdbcTemplate,
+ AccountingDropdownReadPlatformService accountingDropdownReadPlatformService) {
+ return new TaxReadPlatformServiceImpl(jdbcTemplate, accountingDropdownReadPlatformService);
+ }
+
+ @Bean
+ @ConditionalOnMissingBean
Review Comment:
Please provide the Java interface class reference in parenthesis with the `@ConditionalOnMissingBean` annotation.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] adamsaghy commented on pull request #3374: FINERACT-1932: Add custom Configuration class for tax service
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #3374:
URL: https://github.com/apache/fineract/pull/3374#issuecomment-1713388766
@mmagdiab Please kindly check the below error:
```
(see https://errorprone.info/bugpattern/StringCaseLocaleUsage)
Did you mean 'StringUtils.capitalize(accountType.toString().toLowerCase(Locale.ROOT)) + " account with identifier " + id + " does not exist", id, e);' or 'StringUtils.capitalize(accountType.toString().toLowerCase(Locale.getDefault())) + " account with identifier " + id + " does not exist", id, e);' or 'StringUtils.capitalize(Ascii.toLowerCase(accountType.toString())) + " account with identifier " + id + " does not exist", id, e);'?
/home/runner/work/fineract/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxConfiguration.java:29: error: [WildcardImport] Wildcard imports, static or otherwise, should not be used
import org.apache.fineract.portfolio.tax.service.*;
```
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-1932: Add custom Configuration class for tax service [fineract]
Posted by "galovics (via GitHub)" <gi...@apache.org>.
galovics merged PR #3374:
URL: https://github.com/apache/fineract/pull/3374
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] mmagdiab commented on pull request #3374: FINERACT-1932: Add custom Configuration class for tax service
Posted by "mmagdiab (via GitHub)" <gi...@apache.org>.
mmagdiab commented on PR #3374:
URL: https://github.com/apache/fineract/pull/3374#issuecomment-1741709866
> @mmagdiab Please kindly check the below error:
>
> ```
> (see https://errorprone.info/bugpattern/StringCaseLocaleUsage)
> Did you mean 'StringUtils.capitalize(accountType.toString().toLowerCase(Locale.ROOT)) + " account with identifier " + id + " does not exist", id, e);' or 'StringUtils.capitalize(accountType.toString().toLowerCase(Locale.getDefault())) + " account with identifier " + id + " does not exist", id, e);' or 'StringUtils.capitalize(Ascii.toLowerCase(accountType.toString())) + " account with identifier " + id + " does not exist", id, e);'?
> /home/runner/work/fineract/fineract/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxConfiguration.java:29: error: [WildcardImport] Wildcard imports, static or otherwise, should not be used
> import org.apache.fineract.portfolio.tax.service.*;
> ```
resolved
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] vidakovic commented on a diff in pull request #3374: Add custom AutoConfiguration class for tax service (FINERACT-1932)
Posted by "vidakovic (via GitHub)" <gi...@apache.org>.
vidakovic commented on code in PR #3374:
URL: https://github.com/apache/fineract/pull/3374#discussion_r1296892094
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformServiceImpl.java:
##########
@@ -49,7 +48,7 @@ public class TaxReadPlatformServiceImpl implements TaxReadPlatformService {
private final JdbcTemplate jdbcTemplate;
private final AccountingDropdownReadPlatformService accountingDropdownReadPlatformService;
- @Autowired
+
public TaxReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate,
Review Comment:
Please use Lombok annotations to get rid of the constructor. Let's clean up when we have the opportunity.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [fineract] MoMagdy14 commented on a diff in pull request #3374: FINERACT-1932: Add custom AutoConfiguration class for tax service
Posted by "MoMagdy14 (via GitHub)" <gi...@apache.org>.
MoMagdy14 commented on code in PR #3374:
URL: https://github.com/apache/fineract/pull/3374#discussion_r1298227793
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformServiceImpl.java:
##########
@@ -49,7 +48,7 @@ public class TaxReadPlatformServiceImpl implements TaxReadPlatformService {
private final JdbcTemplate jdbcTemplate;
private final AccountingDropdownReadPlatformService accountingDropdownReadPlatformService;
- @Autowired
+
public TaxReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate,
Review Comment:
done, updated.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org