From 8e6e649459431288f3f238697f6c486f40c58c1c Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Tue, 28 May 2024 02:18:26 +0530 Subject: [PATCH] MOSIP-32461 code changes Signed-off-by: Sowmya Ujjappa Banakar --- .../pom.xml | 6 ------ .../status/api/RegistrationStatusApiApplication.java | 6 ++++-- .../pom.xml | 6 ------ .../RegistrationTransactionServiceApplication.java | 6 ++++-- .../RegistrationProcessorLandingZoneApplication.java | 5 +++-- .../src/main/resources/bootstrap.properties | 2 +- .../notification/NotificationApplication.java | 6 +++++- .../src/main/resources/bootstrap.properties | 2 +- .../workflowmanager/WorkflowManagerApplication.java | 11 ++++++++--- .../src/main/resources/bootstrap.properties | 1 + 10 files changed, 27 insertions(+), 24 deletions(-) diff --git a/registration-processor/init/registration-processor-registration-status-service/pom.xml b/registration-processor/init/registration-processor-registration-status-service/pom.xml index d96819296ac..b076a810128 100644 --- a/registration-processor/init/registration-processor-registration-status-service/pom.xml +++ b/registration-processor/init/registration-processor-registration-status-service/pom.xml @@ -42,12 +42,6 @@ io.springfox springfox-swagger2 - - org.springframework.boot - - spring-boot-starter-activemq - - diff --git a/registration-processor/init/registration-processor-registration-status-service/src/main/java/io/mosip/registration/processor/status/api/RegistrationStatusApiApplication.java b/registration-processor/init/registration-processor-registration-status-service/src/main/java/io/mosip/registration/processor/status/api/RegistrationStatusApiApplication.java index 64807c34ac8..7d22152dbbb 100644 --- a/registration-processor/init/registration-processor-registration-status-service/src/main/java/io/mosip/registration/processor/status/api/RegistrationStatusApiApplication.java +++ b/registration-processor/init/registration-processor-registration-status-service/src/main/java/io/mosip/registration/processor/status/api/RegistrationStatusApiApplication.java @@ -2,6 +2,8 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; +import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.FilterType; @@ -24,7 +26,7 @@ * @author Pranav Kumar * */ -@SpringBootApplication +@SpringBootApplication(exclude = { JmsAutoConfiguration.class, ActiveMQAutoConfiguration.class }) @ComponentScan(basePackages = { "io.mosip.registration.processor.status.*", "io.mosip.registration.processor.rest.client.*", "io.mosip.registration.processor.core.token.*", "io.mosip.registration.processor.core.config", @@ -33,7 +35,7 @@ excludeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, value = { RegistrationStatusServiceBeanConfig.class, RestConfigBean.class, KafkaMosipEventBus.class, VertxMosipEventBus.class, StageHealthCheckHandler.class, MosipVerticleManager.class, MosipVerticleAPIManager.class, MosipEventBus.class, - PropertyLoaderConfig.class, ActivemqConfigBean.class })) + PropertyLoaderConfig.class })) public class RegistrationStatusApiApplication { public static void main( String[] args ) diff --git a/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml b/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml index cb2736cac97..ad5227cd4a7 100644 --- a/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml +++ b/registration-processor/post-processor/registration-processor-registration-transaction-service/pom.xml @@ -50,12 +50,6 @@ io.springfox springfox-swagger2 - - org.springframework.boot - - spring-boot-starter-activemq - - diff --git a/registration-processor/post-processor/registration-processor-registration-transaction-service/src/main/java/io/mosip/registration/processor/transaction/api/RegistrationTransactionServiceApplication.java b/registration-processor/post-processor/registration-processor-registration-transaction-service/src/main/java/io/mosip/registration/processor/transaction/api/RegistrationTransactionServiceApplication.java index 7973aa3da77..f6e53534778 100644 --- a/registration-processor/post-processor/registration-processor-registration-transaction-service/src/main/java/io/mosip/registration/processor/transaction/api/RegistrationTransactionServiceApplication.java +++ b/registration-processor/post-processor/registration-processor-registration-transaction-service/src/main/java/io/mosip/registration/processor/transaction/api/RegistrationTransactionServiceApplication.java @@ -2,6 +2,8 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; +import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.FilterType; @@ -11,13 +13,13 @@ import io.mosip.registration.processor.rest.client.config.RestConfigBean; import io.mosip.registration.processor.status.config.RegistrationStatusBeanConfig; -@SpringBootApplication +@SpringBootApplication(exclude = { JmsAutoConfiguration.class, ActiveMQAutoConfiguration.class }) @ComponentScan(basePackages= {"io.mosip.registration.processor.status.*","io.mosip.registration.processor.rest.client.*", "io.mosip.registration.processor.core.token.*", "io.mosip.registration.processor.core.config", "io.mosip.registration.processor.transaction.*", "${mosip.auth.adapter.impl.basepackage}", "io.mosip.registration.processor.core.kernel.beans" }, excludeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, value = { RestConfigBean.class, - PropertyLoaderConfig.class, ActivemqConfigBean.class })) + PropertyLoaderConfig.class })) public class RegistrationTransactionServiceApplication { public static void main(String[] args) { diff --git a/registration-processor/registration-processor-landing-zone/src/main/java/io/mosip/registration/processor/RegistrationProcessorLandingZoneApplication.java b/registration-processor/registration-processor-landing-zone/src/main/java/io/mosip/registration/processor/RegistrationProcessorLandingZoneApplication.java index 96703c73784..83d0b344b34 100644 --- a/registration-processor/registration-processor-landing-zone/src/main/java/io/mosip/registration/processor/RegistrationProcessorLandingZoneApplication.java +++ b/registration-processor/registration-processor-landing-zone/src/main/java/io/mosip/registration/processor/RegistrationProcessorLandingZoneApplication.java @@ -2,15 +2,16 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; +import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.ComponentScan.Filter; -import io.mosip.kernel.dataaccess.hibernate.config.HibernateDaoConfig; import io.mosip.registration.processor.core.config.configserverloader.PropertyLoaderConfig; import io.mosip.registration.processor.rest.client.config.RestConfigBean; -@SpringBootApplication +@SpringBootApplication(exclude = { JmsAutoConfiguration.class, ActiveMQAutoConfiguration.class }) @ComponentScan( basePackages = { "io.mosip.registration.processor.status.*", "io.mosip.registration.processor.rest.client.*", "io.mosip.registration.processor.util", "io.mosip.registration.processor.core.config", diff --git a/registration-processor/registration-processor-landing-zone/src/main/resources/bootstrap.properties b/registration-processor/registration-processor-landing-zone/src/main/resources/bootstrap.properties index 34dba93bbd2..de9a72ea6d5 100644 --- a/registration-processor/registration-processor-landing-zone/src/main/resources/bootstrap.properties +++ b/registration-processor/registration-processor-landing-zone/src/main/resources/bootstrap.properties @@ -12,7 +12,7 @@ health.config.enabled=false server.port=8098 server.servlet.path=/registrationprocessor/v1/landingzone - +spring.mvc.servlet.path=${server.servlet.path} #management.endpoint.health.show-details=always #management.endpoints.web.exposure.include=info,health,refresh \ No newline at end of file diff --git a/registration-processor/registration-processor-notification-service/src/main/java/io/mosip/registration/processor/notification/NotificationApplication.java b/registration-processor/registration-processor-notification-service/src/main/java/io/mosip/registration/processor/notification/NotificationApplication.java index 16256ac0496..f3078dffedb 100644 --- a/registration-processor/registration-processor-notification-service/src/main/java/io/mosip/registration/processor/notification/NotificationApplication.java +++ b/registration-processor/registration-processor-notification-service/src/main/java/io/mosip/registration/processor/notification/NotificationApplication.java @@ -1,13 +1,17 @@ package io.mosip.registration.processor.notification; import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; +import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.scheduling.annotation.EnableScheduling; import io.mosip.registration.processor.core.config.configserverloader.PropertyLoaderConfig; + import io.mosip.registration.processor.rest.client.config.RestConfigBean; /** * Init class for Notification service. @@ -16,7 +20,7 @@ * @since 1.0.0 * */ -@SpringBootApplication +@SpringBootApplication(exclude = { JmsAutoConfiguration.class, ActiveMQAutoConfiguration.class }) @ComponentScan( basePackages = { "io.mosip.registration.processor.notification.*", "io.mosip.kernel.websub.api.*","${mosip.auth.adapter.impl.basepackage}", "io.mosip.registration.processor.message.sender.config", "io.mosip.registration.processor.rest.client.*", "io.mosip.registration.processor.packet.storage.config", diff --git a/registration-processor/registration-processor-notification-service/src/main/resources/bootstrap.properties b/registration-processor/registration-processor-notification-service/src/main/resources/bootstrap.properties index 949e3ab8dd1..4a7040b8b31 100644 --- a/registration-processor/registration-processor-notification-service/src/main/resources/bootstrap.properties +++ b/registration-processor/registration-processor-notification-service/src/main/resources/bootstrap.properties @@ -11,4 +11,4 @@ server.port=8088 health.config.enabled=false management.endpoints.web.exposure.include=refresh server.servlet.path=/registrationprocessor/v1/notification - +spring.mvc.servlet.path=${server.servlet.path} \ No newline at end of file diff --git a/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/java/io/mosip/registration/processor/workflowmanager/WorkflowManagerApplication.java b/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/java/io/mosip/registration/processor/workflowmanager/WorkflowManagerApplication.java index 46bc948d061..1bc8326057d 100644 --- a/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/java/io/mosip/registration/processor/workflowmanager/WorkflowManagerApplication.java +++ b/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/java/io/mosip/registration/processor/workflowmanager/WorkflowManagerApplication.java @@ -1,8 +1,11 @@ package io.mosip.registration.processor.workflowmanager; import org.springframework.boot.SpringApplication; +import org.springframework.boot.actuate.jms.JmsHealthIndicator; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration; +import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @@ -16,7 +19,7 @@ import io.mosip.registration.processor.workflowmanager.verticle.WorkflowInternalActionVerticle; @Configuration -@EnableAutoConfiguration +@EnableAutoConfiguration(exclude = { JmsAutoConfiguration.class, ActiveMQAutoConfiguration.class }) @SpringBootApplication @ComponentScan(basePackages = { "io.mosip.registration.processor.core.config", "${mosip.auth.adapter.impl.basepackage}", @@ -24,8 +27,10 @@ "io.mosip.registration.processor.status.config", "io.mosip.registration.processor.core.kernel.beans", "io.mosip.registration.processor.packet.storage.config", - "io.mosip.kernel.websub.api.config.publisher" }, excludeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, value = { - HibernateDaoConfig.class, PropertyLoaderConfig.class })) + "io.mosip.kernel.websub.api.config.publisher", + "io.mosip.registration.processor.packet.storage.utils.ActiveMqConnectionUtility" }, excludeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, value = { + HibernateDaoConfig.class, PropertyLoaderConfig.class +})) public class WorkflowManagerApplication { public static void main(String[] args) { diff --git a/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/resources/bootstrap.properties b/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/resources/bootstrap.properties index f3296070a8c..f8519d90d7a 100644 --- a/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/resources/bootstrap.properties +++ b/registration-processor/workflow-engine/registration-processor-workflow-manager-service/src/main/resources/bootstrap.properties @@ -13,6 +13,7 @@ health.config.enabled=false eventbus.port=5754 server.port=8026 server.servlet.path=/registrationprocessor/v1/workflowmanager +spring.mvc.servlet.path=${server.servlet.path} mosip.regproc.workflow-manager.internal.action.server.port=8024 mosip.regproc.workflow-manager.internal.action.eventbus.port=5751 mosip.regproc.workflow-manager.workflowaction.server.port=8023