From e4d1e211ea88bbfbbc52a2b692a1077f14e744b6 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 8396715..ce104f1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.iemr.common Common - 1.0-SNAPSHOT + 3.1.0 war Piramal-Helpline-104-API Piramal Helpline 104 API @@ -254,7 +254,7 @@ - 104api-v3.0.0 + ${artifactId}-${version} org.apache.maven.plugins 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 0000000..4bd562a --- /dev/null +++ b/src/main/webapp/WEB-INF/jboss-web.xml @@ -0,0 +1,4 @@ + + + /104-api + From 4d1fcf9930a1b93835a59139a7f2b77d432f9c5b Mon Sep 17 00:00:00 2001 From: Mithun James <1007084+drtechie@users.noreply.github.com> Date: Fri, 16 May 2025 22:46:42 +0530 Subject: [PATCH 2/5] fix: env variables --- pom.xml | 2 +- src/main/environment/104_ci.properties | 3 +++ src/main/environment/104_dev.properties | 2 ++ src/main/environment/104_example.properties | 4 +++- src/main/environment/104_test.properties | 2 ++ src/main/environment/104_uat.properties | 2 ++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ce104f1..435433f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.iemr.common - Common + helpline-104-api 3.1.0 war Piramal-Helpline-104-API diff --git a/src/main/environment/104_ci.properties b/src/main/environment/104_ci.properties index e7c1233..dccb081 100644 --- a/src/main/environment/104_ci.properties +++ b/src/main/environment/104_ci.properties @@ -22,3 +22,6 @@ logging.file.name=@env.HELPLINE104_API_LOGGING_FILE_NAME@ jwt.secret=@env.JWT_SECRET_KEY@ springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@ springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@ + +sendSMSUrl= @env.COMMON_API_BASE_URL@sms/sendSMS +sendEmailGeneralUrl = @env.COMMON_API_BASE_URL@emailController/sendEmailGeneral \ No newline at end of file diff --git a/src/main/environment/104_dev.properties b/src/main/environment/104_dev.properties index 308886a..39d7839 100644 --- a/src/main/environment/104_dev.properties +++ b/src/main/environment/104_dev.properties @@ -14,6 +14,8 @@ secondary.datasource.driver-class-name=com.mysql.jdbc.Driver # Common Config common-url=/commonapi-v1.0 +sendSMSUrl= /commonapi-v1.0/sms/sendSMS +sendEmailGeneralUrl = /commonapi-v1.0/emailController/sendEmailGeneral ### Redis IP spring.redis.host=localhost diff --git a/src/main/environment/104_example.properties b/src/main/environment/104_example.properties index d1fb345..72c6673 100644 --- a/src/main/environment/104_example.properties +++ b/src/main/environment/104_example.properties @@ -12,7 +12,9 @@ secondary.datasource.url= secondary.datasource.driver-class-name=com.mysql.jdbc.Driver # Common Config -common-url=http://localhost:8080/commonapi-v1.0 +common-url=http://localhost:8080 +sendSMSUrl= http://localhost:8080/sms/sendSMS +sendEmailGeneralUrl = http://localhost:8080/emailController/sendEmailGeneral ### Redis IP spring.redis.host=localhost diff --git a/src/main/environment/104_test.properties b/src/main/environment/104_test.properties index 82c660c..e69d7fd 100644 --- a/src/main/environment/104_test.properties +++ b/src/main/environment/104_test.properties @@ -14,6 +14,8 @@ secondary.datasource.driver-class-name=com.mysql.jdbc.Driver # Common Config common-url=/commonapi-v1.0 +sendSMSUrl= /commonapi-v1.0/sms/sendSMS +sendEmailGeneralUrl = /commonapi-v1.0/emailController/sendEmailGeneral ### Redis IP spring.redis.host=localhost diff --git a/src/main/environment/104_uat.properties b/src/main/environment/104_uat.properties index daf1885..1a1ca91 100644 --- a/src/main/environment/104_uat.properties +++ b/src/main/environment/104_uat.properties @@ -13,6 +13,8 @@ secondary.datasource.driver-class-name=com.mysql.jdbc.Driver # Common Config common-url=/commonapi-v1.0 +sendSMSUrl= /commonapi-v1.0/sms/sendSMS +sendEmailGeneralUrl = /commonapi-v1.0/emailController/sendEmailGeneral ### Redis IP spring.redis.host=localhost From f097a6203702b40cc4ebcc4a0c2b7a67120ca3e1 Mon Sep 17 00:00:00 2001 From: Mithun James <1007084+drtechie@users.noreply.github.com> Date: Sat, 17 May 2025 13:13:51 +0530 Subject: [PATCH 3/5] fix: cleanup env variables; delete unused _dev, _uat, _test env files --- src/main/environment/104_ci.properties | 1 + src/main/environment/104_dev.properties | 22 ------------- src/main/environment/104_example.properties | 5 ++- src/main/environment/104_test.properties | 36 --------------------- src/main/environment/104_uat.properties | 21 ------------ src/main/resources/application.properties | 3 -- 6 files changed, 5 insertions(+), 83 deletions(-) delete mode 100644 src/main/environment/104_dev.properties delete mode 100644 src/main/environment/104_test.properties delete mode 100644 src/main/environment/104_uat.properties diff --git a/src/main/environment/104_ci.properties b/src/main/environment/104_ci.properties index dccb081..202b4e9 100644 --- a/src/main/environment/104_ci.properties +++ b/src/main/environment/104_ci.properties @@ -18,6 +18,7 @@ common-url=@env.COMMON_API_BASE_URL@ spring.redis.host=localhost #ELK logging file name +logging.path=logs/ logging.file.name=@env.HELPLINE104_API_LOGGING_FILE_NAME@ jwt.secret=@env.JWT_SECRET_KEY@ springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@ diff --git a/src/main/environment/104_dev.properties b/src/main/environment/104_dev.properties deleted file mode 100644 index 39d7839..0000000 --- a/src/main/environment/104_dev.properties +++ /dev/null @@ -1,22 +0,0 @@ - -# dev env -# DB Connections -spring.datasource.url= -spring.datasource.username= -spring.datasource.password= -spring.datasource.driver-class-name=com.mysql.jdbc.Driver - -#DB Connections - Secondary -secondary.datasource.username= -secondary.datasource.password= -secondary.datasource.url= -secondary.datasource.driver-class-name=com.mysql.jdbc.Driver - -# Common Config -common-url=/commonapi-v1.0 -sendSMSUrl= /commonapi-v1.0/sms/sendSMS -sendEmailGeneralUrl = /commonapi-v1.0/emailController/sendEmailGeneral - -### Redis IP -spring.redis.host=localhost -jwt.secret= diff --git a/src/main/environment/104_example.properties b/src/main/environment/104_example.properties index 72c6673..a86b2c7 100644 --- a/src/main/environment/104_example.properties +++ b/src/main/environment/104_example.properties @@ -18,4 +18,7 @@ sendEmailGeneralUrl = http://localhost:8080/emailController/sendEmailGeneral ### Redis IP spring.redis.host=localhost -jwt.secret= +jwt.secret=my-32-character-ultra-secure-and-ultra-long-secret +#If both properties are set, only logging.file.name takes effect. +logging.path=logs/ +logging.file.name=logs/helpline104-api.log \ No newline at end of file diff --git a/src/main/environment/104_test.properties b/src/main/environment/104_test.properties deleted file mode 100644 index e69d7fd..0000000 --- a/src/main/environment/104_test.properties +++ /dev/null @@ -1,36 +0,0 @@ -# test env -spring.jpa.database=default -# DB Connections - Primary -spring.datasource.url= -spring.datasource.username= -spring.datasource.password= -spring.datasource.driver-class-name=com.mysql.jdbc.Driver - -#DB Connections - Secondary -secondary.datasource.username= -secondary.datasource.password= -secondary.datasource.url= -secondary.datasource.driver-class-name=com.mysql.jdbc.Driver - -# Common Config -common-url=/commonapi-v1.0 -sendSMSUrl= /commonapi-v1.0/sms/sendSMS -sendEmailGeneralUrl = /commonapi-v1.0/emailController/sendEmailGeneral - -### Redis IP -spring.redis.host=localhost -jwt.secret= - - - - - - - - - - - - - - diff --git a/src/main/environment/104_uat.properties b/src/main/environment/104_uat.properties deleted file mode 100644 index 1a1ca91..0000000 --- a/src/main/environment/104_uat.properties +++ /dev/null @@ -1,21 +0,0 @@ -# UAT env -# DB Connections -spring.datasource.url= -spring.datasource.username= -spring.datasource.password= -spring.datasource.driver-class-name=com.mysql.jdbc.Driver - -#DB Connections - Secondary -secondary.datasource.username= -secondary.datasource.password= -secondary.datasource.url= -secondary.datasource.driver-class-name=com.mysql.jdbc.Driver - -# Common Config -common-url=/commonapi-v1.0 -sendSMSUrl= /commonapi-v1.0/sms/sendSMS -sendEmailGeneralUrl = /commonapi-v1.0/emailController/sendEmailGeneral - -### Redis IP -spring.redis.host=localhost -jwt.secret= diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 1be932e..2bb31ad 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -45,9 +45,6 @@ logging.level.org.hibernate=INFO logging.level.com.iemr=DEBUG logging.level.org.springframework=INFO -logging.path=logs/ -logging.file.name=logs/helpline104-api.log - ##sms details for IMR MMR IMRMMRSmsTemplate= IMR MMR SMS sendSMSUrl= /commonapi-v1.0/sms/sendSMS From 0f0da3e41a73127c926f78546ae60da46d9ac4fc Mon Sep 17 00:00:00 2001 From: Mithun James <1007084+drtechie@users.noreply.github.com> Date: Mon, 19 May 2025 10:49:17 +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 435433f..b327141 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ helpline-104-api 3.1.0 war - Piramal-Helpline-104-API + Helpline-104-API Piramal Helpline 104 API org.springframework.boot From 662d4cda75ed14df4913f8e040440113eea16490 Mon Sep 17 00:00:00 2001 From: Mithun James <1007084+drtechie@users.noreply.github.com> Date: Mon, 19 May 2025 10:55:31 +0530 Subject: [PATCH 5/5] fix: add empty line to end of CI file --- src/main/environment/104_ci.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/environment/104_ci.properties b/src/main/environment/104_ci.properties index 202b4e9..2443c86 100644 --- a/src/main/environment/104_ci.properties +++ b/src/main/environment/104_ci.properties @@ -25,4 +25,4 @@ springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@ springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@ sendSMSUrl= @env.COMMON_API_BASE_URL@sms/sendSMS -sendEmailGeneralUrl = @env.COMMON_API_BASE_URL@emailController/sendEmailGeneral \ No newline at end of file +sendEmailGeneralUrl = @env.COMMON_API_BASE_URL@emailController/sendEmailGeneral