diff --git a/pom.xml b/pom.xml
index c0b06504..2afbf266 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
1.6.3
3.0.2
- 2.43.0
+ 2.44.1
1.2.1
5.0.0.4389
0.8.12
diff --git a/src/main/java/com/app/folioman/config/db/AppDataSourceProperties.java b/src/main/java/com/app/folioman/config/db/AppDataSourceProperties.java
index f49c0891..60c96c5d 100644
--- a/src/main/java/com/app/folioman/config/db/AppDataSourceProperties.java
+++ b/src/main/java/com/app/folioman/config/db/AppDataSourceProperties.java
@@ -12,8 +12,7 @@
@Validated
public class AppDataSourceProperties {
- @Min(value = 5, message = "Min OverGrow size should be 5")
- private int maxOvergrowPoolSize;
+ @Min(value = 5, message = "Min OverGrow size should be 5") private int maxOvergrowPoolSize;
private AcquisitionStrategy acquisitionStrategy;
@@ -36,18 +35,14 @@ public void setAcquisitionStrategy(AcquisitionStrategy acquisitionStrategy) {
public static class AcquisitionStrategy {
/** Number of retry attempts for connection acquisition */
- @Min(value = 1, message = "At least one retry must be configured")
- @Max(value = 10, message = "Maximum 10 retries allowed")
- private int retries;
+ @Min(value = 1, message = "At least one retry must be configured") @Max(value = 10, message = "Maximum 10 retries allowed") private int retries;
/** Timeout increment in milliseconds between retries */
- @Min(value = 50, message = "Increment timeout must be at least 50ms")
- private int incrementTimeout;
+ @Min(value = 50, message = "Increment timeout must be at least 50ms") private int incrementTimeout;
@Positive(message = "Lease time threshold must be non-negative") private long leaseTimeThreshold;
- @Min(value = 100, message = "Acquisition timeout must be at least 100ms")
- private long acquisitionTimeout;
+ @Min(value = 100, message = "Acquisition timeout must be at least 100ms") private long acquisitionTimeout;
public int getRetries() {
return retries;
diff --git a/src/main/java/com/app/folioman/mfschemes/config/AmfiProperties.java b/src/main/java/com/app/folioman/mfschemes/config/AmfiProperties.java
index 03fb3eb3..773af703 100644
--- a/src/main/java/com/app/folioman/mfschemes/config/AmfiProperties.java
+++ b/src/main/java/com/app/folioman/mfschemes/config/AmfiProperties.java
@@ -20,8 +20,7 @@
@ConfigurationProperties(prefix = "app.amfi")
public class AmfiProperties {
- @Valid
- private SchemeProperties scheme;
+ @Valid private SchemeProperties scheme;
private String dataUrl;
diff --git a/src/main/java/com/app/folioman/mfschemes/config/ApplicationProperties.java b/src/main/java/com/app/folioman/mfschemes/config/ApplicationProperties.java
index 5e50dbcf..3025f021 100644
--- a/src/main/java/com/app/folioman/mfschemes/config/ApplicationProperties.java
+++ b/src/main/java/com/app/folioman/mfschemes/config/ApplicationProperties.java
@@ -14,14 +14,11 @@
@Validated
public class ApplicationProperties {
- @Valid
- private AmfiProperties amfi;
+ @Valid private AmfiProperties amfi;
- @Valid
- private BseStarProperties bseStar;
+ @Valid private BseStarProperties bseStar;
- @Valid
- private NavProperties nav;
+ @Valid private NavProperties nav;
public AmfiProperties getAmfi() {
return amfi;
diff --git a/src/main/java/com/app/folioman/mfschemes/config/BseStarProperties.java b/src/main/java/com/app/folioman/mfschemes/config/BseStarProperties.java
index 17c70c01..a7fb74f0 100644
--- a/src/main/java/com/app/folioman/mfschemes/config/BseStarProperties.java
+++ b/src/main/java/com/app/folioman/mfschemes/config/BseStarProperties.java
@@ -18,8 +18,7 @@
@ConfigurationProperties(prefix = "app.bsestar")
public class BseStarProperties {
- @Valid
- private SchemeProperties scheme;
+ @Valid private SchemeProperties scheme;
public SchemeProperties getScheme() {
return scheme;
diff --git a/src/main/java/com/app/folioman/mfschemes/config/MfApiProperties.java b/src/main/java/com/app/folioman/mfschemes/config/MfApiProperties.java
index f32756d7..9e5d008a 100644
--- a/src/main/java/com/app/folioman/mfschemes/config/MfApiProperties.java
+++ b/src/main/java/com/app/folioman/mfschemes/config/MfApiProperties.java
@@ -9,8 +9,7 @@
@ConfigurationProperties(prefix = "app.nav.mfapi")
public class MfApiProperties {
- @NotBlank(message = "Data URL must not be blank")
- @Pattern(regexp = "^https?://.*", message = "Data URL must be a valid HTTP(S) URL")
+ @NotBlank(message = "Data URL must not be blank") @Pattern(regexp = "^https?://.*", message = "Data URL must be a valid HTTP(S) URL")
private String dataUrl;
public String getDataUrl() {
diff --git a/src/main/java/com/app/folioman/mfschemes/config/NavProperties.java b/src/main/java/com/app/folioman/mfschemes/config/NavProperties.java
index 72f86ea1..81e4f00a 100644
--- a/src/main/java/com/app/folioman/mfschemes/config/NavProperties.java
+++ b/src/main/java/com/app/folioman/mfschemes/config/NavProperties.java
@@ -9,11 +9,9 @@
@Validated
public class NavProperties {
- @Valid
- private AmfiProperties amfi;
+ @Valid private AmfiProperties amfi;
- @Valid
- private MfApiProperties mfApi;
+ @Valid private MfApiProperties mfApi;
public AmfiProperties getAmfi() {
return amfi;
diff --git a/src/main/java/com/app/folioman/mfschemes/config/SchemeProperties.java b/src/main/java/com/app/folioman/mfschemes/config/SchemeProperties.java
index e0ce29a6..f737750b 100644
--- a/src/main/java/com/app/folioman/mfschemes/config/SchemeProperties.java
+++ b/src/main/java/com/app/folioman/mfschemes/config/SchemeProperties.java
@@ -11,8 +11,7 @@
@Validated
public class SchemeProperties {
- @NotBlank(message = "Data URL must not be blank")
- @Pattern(
+ @NotBlank(message = "Data URL must not be blank") @Pattern(
regexp = "^https?://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]",
message = "Data URL must be a valid HTTP(S) URL")
private String dataUrl;
diff --git a/src/main/java/com/app/folioman/mfschemes/web/controller/NAVController.java b/src/main/java/com/app/folioman/mfschemes/web/controller/NAVController.java
index 3aac0270..385040a4 100644
--- a/src/main/java/com/app/folioman/mfschemes/web/controller/NAVController.java
+++ b/src/main/java/com/app/folioman/mfschemes/web/controller/NAVController.java
@@ -31,20 +31,14 @@ public NAVController(MFNavService mfNavService) {
@GetMapping(path = "/{schemeCode}")
MFSchemeDTO getScheme(
@PathVariable
- @Min(value = 100000, message = "Min value of schemeCode should be greater than 100000")
- @Max(value = 160000, message = "Max value of schemeCode should be less than 160000")
- @Valid
- Long schemeCode) {
+ @Min(value = 100000, message = "Min value of schemeCode should be greater than 100000") @Max(value = 160000, message = "Max value of schemeCode should be less than 160000") @Valid Long schemeCode) {
return mfNavService.getNav(schemeCode);
}
@GetMapping(path = "/{schemeCode}/{date}")
public MFSchemeDTO getSchemeNavOnDate(
@PathVariable
- @Min(value = 100000, message = "Min value of schemeCode should be greater than 100000")
- @Max(value = 160000, message = "Max value of schemeCode should be less than 160000")
- @Valid
- Long schemeCode,
+ @Min(value = 100000, message = "Min value of schemeCode should be greater than 100000") @Max(value = 160000, message = "Max value of schemeCode should be less than 160000") @Valid Long schemeCode,
@PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate inputDate) {
return mfNavService.getNavOnDate(schemeCode, inputDate);
}
diff --git a/src/main/java/com/app/folioman/portfolio/models/request/Fund.java b/src/main/java/com/app/folioman/portfolio/models/request/Fund.java
index cce0e599..6ab407e8 100644
--- a/src/main/java/com/app/folioman/portfolio/models/request/Fund.java
+++ b/src/main/java/com/app/folioman/portfolio/models/request/Fund.java
@@ -13,6 +13,4 @@
*/
public record Fund(
@Positive(message = "Fund value cannot be negative") double value,
- @DecimalMin(value = "0.0", message = "Fund ratio must be between 0 and 1")
- @DecimalMax(value = "1.0", message = "Fund ratio must be between 0 and 1")
- double ratio) {}
+ @DecimalMin(value = "0.0", message = "Fund ratio must be between 0 and 1") @DecimalMax(value = "1.0", message = "Fund ratio must be between 0 and 1") double ratio) {}
diff --git a/src/main/java/com/app/folioman/portfolio/models/request/InvestmentRequest.java b/src/main/java/com/app/folioman/portfolio/models/request/InvestmentRequest.java
index c57084a6..3eb53df3 100644
--- a/src/main/java/com/app/folioman/portfolio/models/request/InvestmentRequest.java
+++ b/src/main/java/com/app/folioman/portfolio/models/request/InvestmentRequest.java
@@ -12,6 +12,5 @@
* The funds list must not be empty, and the investment amount must be positive.
*/
public record InvestmentRequest(
- @NotEmpty(message = "Investment request and funds list cannot be null or empty") @ValidSumOfRatios @Valid
- List funds,
+ @NotEmpty(message = "Investment request and funds list cannot be null or empty") @ValidSumOfRatios @Valid List funds,
@PositiveOrZero(message = "Amount to invest cannot be negative") double amountToInvest) {}
diff --git a/src/main/java/com/app/folioman/portfolio/web/controller/ImportMutualFundController.java b/src/main/java/com/app/folioman/portfolio/web/controller/ImportMutualFundController.java
index c841c78c..678c47b5 100644
--- a/src/main/java/com/app/folioman/portfolio/web/controller/ImportMutualFundController.java
+++ b/src/main/java/com/app/folioman/portfolio/web/controller/ImportMutualFundController.java
@@ -44,12 +44,10 @@ UploadFileResponse upload(@RequestPart("file") MultipartFile multipartFile) thro
@GetMapping("/api/portfolio/{pan}")
public PortfolioResponse getPortfolio(
- @PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format")
- String panNumber,
+ @PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format") String panNumber,
@RequestParam(required = false)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
- @PastOrPresent(message = "Date should be past or today")
- LocalDate asOfDate) {
+ @PastOrPresent(message = "Date should be past or today") LocalDate asOfDate) {
return userDetailService.getPortfolioByPAN(panNumber, asOfDate);
}
}
diff --git a/src/main/java/com/app/folioman/portfolio/web/controller/UserTransactionsController.java b/src/main/java/com/app/folioman/portfolio/web/controller/UserTransactionsController.java
index 1fe7ad04..75d3377a 100644
--- a/src/main/java/com/app/folioman/portfolio/web/controller/UserTransactionsController.java
+++ b/src/main/java/com/app/folioman/portfolio/web/controller/UserTransactionsController.java
@@ -27,8 +27,7 @@ class UserTransactionsController {
@GetMapping("/investments/{pan}")
public List getTotalInvestmentsByPanPerMonth(
- @PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format")
- String pan) {
+ @PathVariable("pan") @Pattern(regexp = "[A-Z]{5}[0-9]{4}[A-Z]", message = "Invalid PAN number format") String pan) {
return userTransactionDetailsService.getTotalInvestmentsByPanPerMonth(pan);
}
}