-
Notifications
You must be signed in to change notification settings - Fork 28
Move code from Release 3.4.0 to Main #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a3a8079
458af67
cd5cffb
16c3991
b66035c
d878d4b
2b7f4c3
1aadead
e50c0e9
ea84964
e1d6ece
690e358
b384bc5
9571a35
3d3ce58
4c85e25
9c97e6d
43df9cf
2828fe6
604bd64
62a5a18
d592f6a
26bf74c
9f7fb1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.iemr.mmu</groupId> | ||
<artifactId>mmu-api</artifactId> | ||
<version>3.1.0</version> | ||
<version>3.4.0</version> | ||
<packaging>war</packaging> | ||
|
||
<name>MMU-API</name> | ||
|
@@ -47,12 +47,22 @@ | |
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
<exclusions> | ||
<!-- <exclusions> | ||
<exclusion> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-logging</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</exclusions> --> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
Comment on lines
+57
to
66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π‘ Verification agent π§© Analysis chainUndefined ${slf4j.version} property The POM references ${slf4j.version} but no such property is defined locally. Rely on Spring Bootβs dependency management (remove explicit versions) or define the property in . Minimal change: remove explicit versions and let Boot manage slf4j-api (if you keep it at all): - <version>${slf4j.version}</version> Given Boot already brings slf4j-api transitively, the safest is to remove both slf4j-api and slf4j-simple dependencies entirely. π Script executed: #!/bin/bash
rg -n "<slf4j.version>|slf4j.version" pom.xml Length of output: 217 Fix undefined The Affected locations:
Suggested fixes:
--- pom.xml
@@ -58,12 +58,8 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>${slf4j.version}</version>
</dependency>
@@ -177,12 +173,8 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>${slf4j.version}</version>
</dependency>
<properties>
<!-- add this (choose an appropriate version) -->
<slf4j.version>1.7.36</slf4j.version>
</properties>
Please address these changes to avoid build failures and ensure consistent dependency management. π€ Prompt for AI Agents
|
||
<dependency> | ||
<groupId>co.elastic.logging</groupId> | ||
|
@@ -163,6 +173,17 @@ | |
<artifactId>jackson-datatype-joda</artifactId> | ||
<version>2.17.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<version>${slf4j.version}</version> | ||
</dependency> | ||
Comment on lines
+176
to
+185
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate SLF4J dependencies β remove to avoid conflicts This second slf4j-api/slf4j-simple block duplicates the earlier one. Remove both blocks as noted to avoid version skew and binding conflicts. π€ Prompt for AI Agents
|
||
|
||
<dependency> | ||
<groupId>jakarta.servlet</groupId> | ||
<artifactId>jakarta.servlet-api</artifactId> | ||
|
@@ -179,12 +200,6 @@ | |
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi-ooxml</artifactId> | ||
<version>5.2.5</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-compress</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-redis --> | ||
<dependency> | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -25,7 +25,6 @@ | |||||||||||
import org.slf4j.Logger; | ||||||||||||
import org.slf4j.LoggerFactory; | ||||||||||||
import org.springframework.beans.factory.annotation.Autowired; | ||||||||||||
|
||||||||||||
import org.springframework.web.bind.annotation.GetMapping; | ||||||||||||
import org.springframework.web.bind.annotation.PostMapping; | ||||||||||||
import org.springframework.web.bind.annotation.RequestBody; | ||||||||||||
|
@@ -37,8 +36,8 @@ | |||||||||||
import com.iemr.mmu.service.dataSyncActivity.DownloadDataFromServerImpl; | ||||||||||||
import com.iemr.mmu.service.dataSyncActivity.DownloadDataFromServerTransactionalImpl; | ||||||||||||
import com.iemr.mmu.service.dataSyncActivity.UploadDataToServerImpl; | ||||||||||||
import com.iemr.mmu.utils.response.OutputResponse; | ||||||||||||
import com.iemr.mmu.utils.CookieUtil; | ||||||||||||
import com.iemr.mmu.utils.response.OutputResponse; | ||||||||||||
|
||||||||||||
import io.swagger.v3.oas.annotations.Operation; | ||||||||||||
import jakarta.servlet.http.HttpServletRequest; | ||||||||||||
|
@@ -181,6 +180,8 @@ public String callCentralAPIToGenerateBenIDAndimportToLocal(@RequestBody String | |||||||||||
OutputResponse response = new OutputResponse(); | ||||||||||||
try { | ||||||||||||
String jwtToken = CookieUtil.getJwtTokenFromCookie(request); | ||||||||||||
logger.info("Authorization from controller="+ authorization); | ||||||||||||
|
||||||||||||
Comment on lines
+183
to
+184
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove/mask Authorization header from logs. Logging Authorization/JWT leaks credentials into logs. Mask or drop entirely. - logger.info("Authorization from controller="+ authorization);
+ // Avoid logging secrets. If absolutely necessary, log only a hash or prefix.
+ if (logger.isDebugEnabled()) {
+ logger.debug("Authorization header received (masked)");
+ } π Committable suggestion
Suggested change
π€ Prompt for AI Agents
|
||||||||||||
int i = downloadDataFromServerImpl.callCentralAPIToGenerateBenIDAndimportToLocal(requestOBJ, authorization, | ||||||||||||
serverAuthorization, jwtToken); | ||||||||||||
if (i == 0) { | ||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,10 @@ | |
|
||
import com.google.gson.annotations.Expose; | ||
|
||
import lombok.Data; | ||
|
||
@Entity | ||
@Data | ||
@Table(name = "t_benclinicalobservation") | ||
Comment on lines
+37
to
41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Avoid Lombok @DaTa on JPA entities; it changes equals/hashCode semantics and risks PII in toString.
Apply this change to narrow Lombok impact: -import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
@Entity
-@Data
+@Getter
+@Setter
+@EqualsAndHashCode(onlyExplicitlyIncluded = true)
+@ToString(exclude = {"clinicalObservation","otherSymptoms","otherSymptomsSCTCode","otherSymptomsSCTTerm",
+ "significantFindings","processed","createdBy","modifiedBy","vehicalNo",
+ "syncedBy","reservedForChange"})
@Table(name = "t_benclinicalobservation") Additionally, explicitly include the primary key in equality to keep entity identity stable: // Add just above the ID field declaration
@EqualsAndHashCode.Include I can push a follow-up patch across all entity classes where π€ Prompt for AI Agents
|
||
public class BenClinicalObservations { | ||
@Id | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
Re-enabling Spring Boot default logging while adding slf4j-simple will cause multiple SLF4J bindings
With spring-boot-starter-logging active (Logback binding), adding slf4j-simple introduces two bindings and noisy runtime warnings. Prefer keeping Bootβs Logback (especially since logback-ecs-encoder is used) and remove slf4j-simple.
Apply the diffs below (also removes duplicate slf4j blocks later):
If you truly need to override the binding, exclude spring-boot-starter-logging from all starters and add a single SLF4J binding β but that would break logback-ecs-encoder usage.
Search for multiple SLF4J bindings and the presence of slf4j.version property:
π Script executed:
Length of output: 689
Remove duplicate SLF4J bindings and rely on Spring Bootβs Logback
To avoid multiple SLF4J bindings (Logback + slf4j-simple) and the resulting runtime warnings, remove your explicit SLF4J dependencies and let Spring Bootβs default starter-logging (Logback + logback-ecs-encoder) handle logging. Based on the grep output, youβve declared two identical blocks of
slf4j-api
+slf4j-simple
(around lines 58β66 and 177β185), and you also have a commented-out<exclusions>
block underspring-boot-starter
(lines 50β56).Please apply the following diffs to
pom.xml
:After this change, only Logback (via
spring-boot-starter-logging
) will serve as the SLF4J binding, eliminating duplicate bindings and preserving logback-ecs-encoder functionality.π€ Prompt for AI Agents