From 832db2b16af15857b73bbc60431dcf4794a12935 Mon Sep 17 00:00:00 2001
From: Mithun James <1007084+drtechie@users.noreply.github.com>
Date: Thu, 15 May 2025 16:24:34 +0530
Subject: [PATCH 1/5] feat: ensure url doesn't have version. upgrade version
---
pom.xml | 4 ++--
src/main/webapp/WEB-INF/jboss-web.xml | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
create mode 100644 src/main/webapp/WEB-INF/jboss-web.xml
diff --git a/pom.xml b/pom.xml
index 14df17d3..f196b2a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
com.iemr.common.identity
identity
- 0.0.1
+ 3.1.0
war
@@ -235,7 +235,7 @@
- identity-v3.0.0
+ ${artifactId}-${version}
org.owasp
diff --git a/src/main/webapp/WEB-INF/jboss-web.xml b/src/main/webapp/WEB-INF/jboss-web.xml
new file mode 100644
index 00000000..c5986d9f
--- /dev/null
+++ b/src/main/webapp/WEB-INF/jboss-web.xml
@@ -0,0 +1,4 @@
+
+
+ /identity-api
+
From 6276e0e6240acda0133093ba8a84e5e0ec895d3e Mon Sep 17 00:00:00 2001
From: Mithun James <1007084+drtechie@users.noreply.github.com>
Date: Sat, 17 May 2025 00:02:37 +0530
Subject: [PATCH 2/5] fix: war file artifact names
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f196b2a8..ae4b5aa1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.iemr.common.identity
- identity
+ identity-api
3.1.0
war
From 4236fc40f0df293ffd44addc4f70a1e5b1178c38 Mon Sep 17 00:00:00 2001
From: Mithun James <1007084+drtechie@users.noreply.github.com>
Date: Sat, 17 May 2025 13:14:01 +0530
Subject: [PATCH 3/5] fix: cleanup env variables; delete unused _dev, _uat,
_test env files
---
pom.xml | 29 +++++++++++++++++--
src/main/environment/1097_ci.properties | 8 +++++
src/main/environment/1097_dev.properties | 8 -----
src/main/environment/1097_example.properties | 12 +++++++-
src/main/environment/1097_test.properties | 8 -----
src/main/environment/1097_uat.properties | 7 -----
src/main/environment/common_ci.properties | 9 ++++++
src/main/environment/common_dev.properties | 7 -----
.../environment/common_example.properties | 10 +++++++
src/main/environment/common_test.properties | 5 ----
src/main/environment/common_uat.properties | 7 -----
src/main/resources/application.properties | 9 ------
src/main/webapp/WEB-INF/jboss-web.xml | 2 +-
13 files changed, 65 insertions(+), 56 deletions(-)
delete mode 100644 src/main/environment/1097_dev.properties
delete mode 100644 src/main/environment/1097_test.properties
delete mode 100644 src/main/environment/1097_uat.properties
delete mode 100644 src/main/environment/common_dev.properties
delete mode 100644 src/main/environment/common_test.properties
delete mode 100644 src/main/environment/common_uat.properties
diff --git a/pom.xml b/pom.xml
index ae4b5aa1..cc458e6b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,8 @@
${ENV_VAR}
target/classes/application.properties
target/classes/common_${environment}.properties
+ common_${environment}.properties
+ identity-api
false
target
0.8.11
@@ -224,12 +226,14 @@
1097_identity
- 1097identityapi-v1.0
+ 1097identity-api-${version}
target/classes/application.properties
target/classes/1097_${environment}.properties
+ 1097_${environment}.properties
+ 1097identity-api
- 1097identityapi-v1.0
+ 1097identityapi-${version}
@@ -329,7 +333,8 @@
true
- common_${environment}.properties
+ ${ci-file}
+
@@ -364,6 +369,20 @@
+
+ process-resources
+
+ run
+
+ clean-property-files
+
+
+
+
+
+
+
+
@@ -402,6 +421,10 @@
true
src/packaging/
+
+ src/main/webapp
+ true
+
diff --git a/src/main/environment/1097_ci.properties b/src/main/environment/1097_ci.properties
index 1da54151..8b963116 100644
--- a/src/main/environment/1097_ci.properties
+++ b/src/main/environment/1097_ci.properties
@@ -5,8 +5,16 @@ spring.datasource.password=@env.DATABASE_IDENTITY_PASSWORD@
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#ELK logging file name
+logging.path=logs/
logging.file.name=@env.IDENTITY_API_1097_LOGGING_FILE_NAME@
springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@
springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@
+jwt.secret=@JWT_SECRET_KEY@
+
+ # TM Config
+tm-url=@TM_API@
+
+# FHIR Config
+fhir-url=@FHIR_API@
\ No newline at end of file
diff --git a/src/main/environment/1097_dev.properties b/src/main/environment/1097_dev.properties
deleted file mode 100644
index 65d30eff..00000000
--- a/src/main/environment/1097_dev.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# DataSource settings: set here your own configurations for the database
-
-spring.datasource.url=
-spring.datasource.username=
-spring.datasource.password=
-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
-
-
diff --git a/src/main/environment/1097_example.properties b/src/main/environment/1097_example.properties
index 647d089d..6a7d8b0f 100644
--- a/src/main/environment/1097_example.properties
+++ b/src/main/environment/1097_example.properties
@@ -1,7 +1,17 @@
server.port=8095
# DataSource settings: set here your own configurations for the database
-spring.datasource.url=jdbc:mysql://localhost:3306/db_identity
+spring.datasource.url=jdbc:mysql://localhost:3306/db_1097_identity
spring.datasource.username=root
spring.datasource.password=1234
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+
+jwt.secret=my-32-character-ultra-secure-and-ultra-long-secret
+logging.path=logs/
+logging.file.name=logs/1097identity-api.log
+
+ # TM Config
+tm-url=http://localhost:8089/
+
+# FHIR Config
+fhir-url=http://localhost:8093/
\ No newline at end of file
diff --git a/src/main/environment/1097_test.properties b/src/main/environment/1097_test.properties
deleted file mode 100644
index 65d30eff..00000000
--- a/src/main/environment/1097_test.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# DataSource settings: set here your own configurations for the database
-
-spring.datasource.url=
-spring.datasource.username=
-spring.datasource.password=
-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
-
-
diff --git a/src/main/environment/1097_uat.properties b/src/main/environment/1097_uat.properties
deleted file mode 100644
index 10335c6c..00000000
--- a/src/main/environment/1097_uat.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# DataSource settings: set here your own configurations for the database
-
-spring.datasource.url=
-spring.datasource.username=
-spring.datasource.password=
-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
diff --git a/src/main/environment/common_ci.properties b/src/main/environment/common_ci.properties
index 32cb2713..c202f388 100644
--- a/src/main/environment/common_ci.properties
+++ b/src/main/environment/common_ci.properties
@@ -5,7 +5,16 @@ spring.datasource.password=@env.DATABASE_IDENTITY_PASSWORD@
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#ELK logging file name
+logging.path=logs/
logging.file.name=@env.IDENTITY_API_LOGGING_FILE_NAME@
springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@
springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@
+
+jwt.secret=@JWT_SECRET_KEY@
+
+ # TM Config
+tm-url=@TM_API@
+
+# FHIR Config
+fhir-url=@FHIR_API@
\ No newline at end of file
diff --git a/src/main/environment/common_dev.properties b/src/main/environment/common_dev.properties
deleted file mode 100644
index be3ba54b..00000000
--- a/src/main/environment/common_dev.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# DataSource settings: set here your own configurations for the database
-spring.datasource.url=
-spring.datasource.username=
-spring.datasource.password=
-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
-
-
diff --git a/src/main/environment/common_example.properties b/src/main/environment/common_example.properties
index 78112d91..79dfeb12 100644
--- a/src/main/environment/common_example.properties
+++ b/src/main/environment/common_example.properties
@@ -4,3 +4,13 @@ spring.datasource.url=jdbc:mysql://localhost:3306/db_iemr
spring.datasource.username=root
spring.datasource.password=1234
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+
+jwt.secret=my-32-character-ultra-secure-and-ultra-long-secret
+logging.path=logs/
+logging.file.name=logs/identity-api.log
+
+ # TM Config
+tm-url=http://localhost:8089/
+
+# FHIR Config
+fhir-url=http://localhost:8093/
\ No newline at end of file
diff --git a/src/main/environment/common_test.properties b/src/main/environment/common_test.properties
deleted file mode 100644
index 2792334a..00000000
--- a/src/main/environment/common_test.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-# DataSource settings: set here your own configurations for the database
-spring.datasource.url=
-spring.datasource.username=
-spring.datasource.password=
-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
diff --git a/src/main/environment/common_uat.properties b/src/main/environment/common_uat.properties
deleted file mode 100644
index 386548ec..00000000
--- a/src/main/environment/common_uat.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# DataSource settings: set here your own configurations for the database
-spring.datasource.url=
-spring.datasource.username=
-spring.datasource.password=
-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
-
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 74c71d81..0a0293e6 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -28,9 +28,6 @@ logging.level.org.hibernate=INFO
logging.level.com.iemr=DEBUG
logging.level.org.springframework=INFO
-logging.path=logs/
-logging.file.name=logs/identity-api.log
-
spring.datasource.tomcat.initial-size=5
spring.datasource.tomcat.max-idle=15
spring.datasource.tomcat.max-active=30
@@ -42,15 +39,9 @@ spring.datasource.continue-on-error=true
spring.datasource.tomcat.remove-abandoned-timeout=600
door-to-door-page-size=2
- # TM Config
-tm-url=http://10.208.122.38:8080/tmapi-v1.0
-
#Get-HRP-Status
get-HRP-Status=ANC/getHRPStatus
-# FHIR Config
-fhir-url=http://10.208.122.38:8080/fhirapi-v1.0
-
#Get Beneficiary ABHA
getHealthID=healthID/getBenhealthID
diff --git a/src/main/webapp/WEB-INF/jboss-web.xml b/src/main/webapp/WEB-INF/jboss-web.xml
index c5986d9f..6da32bc8 100644
--- a/src/main/webapp/WEB-INF/jboss-web.xml
+++ b/src/main/webapp/WEB-INF/jboss-web.xml
@@ -1,4 +1,4 @@
- /identity-api
+ /${context.root}
From e0dcd331a1f41c03dffd27d1f4162a2315bac3b8 Mon Sep 17 00:00:00 2001
From: Mithun James <1007084+drtechie@users.noreply.github.com>
Date: Mon, 19 May 2025 10:49:24 +0530
Subject: [PATCH 4/5] fix: update names of the services in pom.xml files
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index cc458e6b..c41d078a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
war
- identity-api
+ Identity-API
iEMR Identity Service
From 572f3bd5500d1e0c3112887ca4af6edae8a903f4 Mon Sep 17 00:00:00 2001
From: Mithun James <1007084+drtechie@users.noreply.github.com>
Date: Mon, 19 May 2025 10:55:34 +0530
Subject: [PATCH 5/5] fix: add empty line to end of CI file
---
src/main/environment/1097_ci.properties | 2 +-
src/main/environment/common_ci.properties | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/environment/1097_ci.properties b/src/main/environment/1097_ci.properties
index 8b963116..ea60930f 100644
--- a/src/main/environment/1097_ci.properties
+++ b/src/main/environment/1097_ci.properties
@@ -17,4 +17,4 @@ jwt.secret=@JWT_SECRET_KEY@
tm-url=@TM_API@
# FHIR Config
-fhir-url=@FHIR_API@
\ No newline at end of file
+fhir-url=@FHIR_API@
diff --git a/src/main/environment/common_ci.properties b/src/main/environment/common_ci.properties
index c202f388..d6b426ef 100644
--- a/src/main/environment/common_ci.properties
+++ b/src/main/environment/common_ci.properties
@@ -17,4 +17,4 @@ jwt.secret=@JWT_SECRET_KEY@
tm-url=@TM_API@
# FHIR Config
-fhir-url=@FHIR_API@
\ No newline at end of file
+fhir-url=@FHIR_API@