diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml
index 60c8716bb51..44eeabdbf40 100644
--- a/.github/workflows/push-trigger.yml
+++ b/.github/workflows/push-trigger.yml
@@ -62,7 +62,7 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
build-maven-pre-registration-booking-service:
- uses: mosip/kattu/.github/workflows/maven-build.yml@master
+ uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: pre-registration-booking-service
BUILD_ARTIFACT: pre-registration-booking-service
@@ -82,7 +82,7 @@ jobs:
BUILD_ARTIFACT: 'pre-registration-booking-service'
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
- uses: mosip/kattu/.github/workflows/docker-build.yml@master
+ uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
@@ -96,7 +96,7 @@ jobs:
publish_to_nexus_pre-registration-booking-service:
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
needs: build-maven-pre-registration-booking-service
- uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master
+ uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
with:
SERVICE_LOCATION: pre-registration-booking-service
secrets:
@@ -109,7 +109,7 @@ jobs:
sonar_analysis:
needs: build-maven-pre-registration-booking-service
if: "${{ github.event_name != 'pull_request' }}"
- uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master
+ uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21
with:
SERVICE_LOCATION: pre-registration-booking-service
PROJECT_KEY: mosip_pre-registration-booking-service
diff --git a/pre-registration-booking-service/Dockerfile b/pre-registration-booking-service/Dockerfile
index 5887878021f..4d669da677d 100644
--- a/pre-registration-booking-service/Dockerfile
+++ b/pre-registration-booking-service/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11
+FROM eclipse-temurin:21-jre-alpine
ARG SOURCE
ARG COMMIT_HASH
@@ -49,16 +49,16 @@ ARG container_user=mosip
ARG container_user_group=mosip
# can be passed during Docker build as build time environment for github branch to pickup configuration from.
-ARG container_user_uid=1001
+ARG container_user_uid=1002
# can be passed during Docker build as build time environment for github branch to pickup configuration from.
ARG container_user_gid=1001
# install packages and create user
-RUN apt-get -y update \
-&& apt-get install -y unzip \
-&& groupadd -g ${container_user_gid} ${container_user_group} \
-&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user}
+RUN apk -q update \
+&& apk add -q unzip wget \
+&& addgroup -g ${container_user_gid} ${container_user_group} \
+&& adduser -s /bin/sh -u ${container_user_uid} -G ${container_user_group} -h /home/${container_user} --disabled-password ${container_user}
# set working directory for the user
WORKDIR /home/${container_user}
diff --git a/pre-registration-booking-service/pom.xml b/pre-registration-booking-service/pom.xml
index 63b5e04abb8..8e099039ade 100644
--- a/pre-registration-booking-service/pom.xml
+++ b/pre-registration-booking-service/pom.xml
@@ -3,53 +3,22 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
- scm:git:git://github.com/mosip/mosip-ref-impl.git
- scm:git:ssh://github.com:mosip/mosip-ref-impl.git
- https://github.com/mosip/mosip-ref-impl
- HEAD
-
-
io.mosip.preregistration
pre-registration-booking-service
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
pre-registration-booking-service
Booking service of MOSIP Pre-registration
https://github.com/mosip/mosip-ref-impl
-
-
-
- MPL 2.0
- https://www.mozilla.org/en-US/MPL/2.0/
-
-
-
-
- Mosip
- mosip.emailnotifier@gmail.com
- io.mosip
- https://github.com/mosip/mosip-ref-impl
-
-
-
-
-
- ossrh
- https://oss.sonatype.org/content/repositories/snapshots
-
-
- ossrh
- https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
-
UTF-8
1.4.2
- 1.2.0.1
- 1.2.0.1
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 21
- 2.0.2.RELEASE
+ 3.2.3
2.0.9.RELEASE
2.0.0.RELEASE
@@ -60,7 +29,6 @@
2.5.0
-
2.5.0
5.1.46
@@ -79,10 +47,10 @@
4.3
- 1.18.8
- 2.23.4
+ 1.18.30
+ 3.4.3
- 1.1
+ 1.1.1
3.1.4
20080701
0.7.4
@@ -91,24 +59,29 @@
**/code/**,**/config/**,**/dao/**,**/dto/**,**/entity/**,**/errorcodes/**,**/exception/**,**/exception/system/**,**/exception/util/**,**/repository/**,**/*Config.java,**/*Application.java,**/batchjob/**,**/util/**,**/stateUtil/**
**/dto/**,**/entity/**,**/config/**
- 11
- 11
- 3.8.0
+ ${java.version}
+ ${java.version}
+ 3.11.0
3.0.2
3.1.0
- 2.22.0
- 0.8.5
+ 3.1.2
+ 0.8.11
3.7.0.1746
3.2.0
+
+ 4.12
+ 1.1.6
+ 1.7.19
+
- org.springframework.boot
- spring-boot-dependencies
- ${spring.boot.version}
+ io.mosip.kernel
+ kernel-bom
+ ${kernel.bom.version}
pom
import
@@ -116,54 +89,8 @@
org.projectlombok
lombok
${lombok.version}
- compile
-
-
- javax.xml.bind
- jaxb-api
- 2.3.0
-
-
- javax.activation
- activation
- 1.1
-
-
- org.glassfish.jaxb
- jaxb-runtime
- 2.3.0-b170127.1453
-
-
- org.javassist
- javassist
- 3.27.0-GA
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
provided
-
- com.fasterxml.jackson.core
- jackson-databind
- 2.12.0
-
-
- com.fasterxml.jackson.core
- jackson-annotations
- 2.12.0
-
-
- com.fasterxml.jackson.core
- jackson-core
- 2.12.0
-
-
- com.fasterxml.jackson.datatype
- jackson-datatype-jsr310
- 2.12.0
-
@@ -191,13 +118,11 @@
org.mockito
mockito-core
- 2.23.4
test
io.jsonwebtoken
jjwt
- 0.6.0
com.h2database
@@ -206,7 +131,6 @@
org.springframework.cloud
spring-cloud-starter-config
- ${spring-cloud-config.version}
org.springframework.boot
@@ -235,17 +159,14 @@
net.logstash.logback
logstash-logback-encoder
- 4.9
ch.qos.logback
logback-classic
- 1.2.3
ch.qos.logback
logback-core
- 1.2.3
net.minidev
@@ -255,22 +176,68 @@
com.jayway.jsonpath
json-path
- 2.2.0
net.minidev
json-smart
- 2.2.1
io.micrometer
micrometer-core
- ${io.micrometer.prometheus.version}
io.micrometer
micrometer-registry-prometheus
- ${io.micrometer.prometheus.version}
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+ javax.activation
+ activation
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+
+
+ org.javassist
+ javassist
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+ 2.5.0
+
+
+ org.hibernate.validator
+ hibernate-validator
@@ -285,7 +252,11 @@
${skipTests}
false
- ${argLine} --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED --illegal-access=permit
+ ${argLine}
+ --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED
+ --add-opens java.base/java.lang=ALL-UNNAMED
+ --illegal-access=debug
+ --enable-preview
@@ -311,7 +282,6 @@
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
true
ZIP
@@ -325,15 +295,10 @@
-
org.apache.maven.plugins
maven-gpg-plugin
- 1.5
+ 3.2.3
sign-artifacts
@@ -432,7 +397,6 @@
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
true
ZIP
@@ -489,4 +453,37 @@
+
+
+ scm:git:git://github.com/mosip/mosip-ref-impl.git
+ scm:git:ssh://github.com:mosip/mosip-ref-impl.git
+ https://github.com/mosip/mosip-ref-impl
+ HEAD
+
+
+
+
+ MPL 2.0
+ https://www.mozilla.org/en-US/MPL/2.0/
+
+
+
+
+ Mosip
+ mosip.emailnotifier@gmail.com
+ io.mosip
+ https://github.com/mosip/mosip-ref-impl
+
+
+
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/BookingApplication.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/BookingApplication.java
index 18db046d951..e49b4d0ed50 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/BookingApplication.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/BookingApplication.java
@@ -6,9 +6,12 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
+import io.mosip.preregistration.booking.config.BookingConfig;
+
/**
* This class is used to define the start of the Booking application.
*
@@ -33,6 +36,7 @@
"io\\.mosip\\.kernel\\.crypto\\..*",
"io\\.mosip\\.kernel\\.clientcrypto\\..*",
}) })
+@EnableConfigurationProperties(BookingConfig.class)
public class BookingApplication {
/**
* Method to start the Booking API service
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/config/BookingConfig.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/config/BookingConfig.java
index e3529399005..1c667cdc540 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/config/BookingConfig.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/config/BookingConfig.java
@@ -5,24 +5,25 @@
*/
package io.mosip.preregistration.booking.config;
-import io.swagger.v3.oas.models.Components;
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.oas.models.info.Info;
-import io.swagger.v3.oas.models.info.License;
-import io.swagger.v3.oas.models.servers.Server;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springdoc.core.GroupedOpenApi;
+import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
+import io.swagger.v3.oas.models.Components;
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Info;
+import io.swagger.v3.oas.models.info.License;
+import io.swagger.v3.oas.models.servers.Server;
/**
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/controller/BookingController.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/controller/BookingController.java
index 9f63d7ab338..3d196011046 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/controller/BookingController.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/controller/BookingController.java
@@ -43,12 +43,12 @@
import io.mosip.preregistration.core.util.DataValidationUtil;
import io.mosip.preregistration.core.util.RequestValidator;
import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
-import springfox.documentation.annotations.ApiIgnore;
/**
* This class provides different API's to perform operations on Booking
@@ -131,7 +131,7 @@ public ResponseEntity> getAvailability(
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(schema = @Schema(hidden = true))) })
public ResponseEntity> bookAppoinment(
@PathVariable("preRegistrationId") String preRegistrationId,
- @Validated @RequestBody(required = true) MainRequestDTO bookingDTO, @ApiIgnore Errors errors ) {
+ @Validated @RequestBody(required = true) MainRequestDTO bookingDTO, @Parameter(hidden = true) Errors errors ) {
log.info("sessionId", "idType", "id",
"In bookAppoinment method of Booking controller to book an appointment for object: " + bookingDTO);
requestValidator.validateId(BOOKING, bookingDTO.getId(), errors);
@@ -157,7 +157,7 @@ public ResponseEntity> bookAppoinment(
@ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(schema = @Schema(hidden = true))) })
public ResponseEntity> bookMultiAppoinment(
- @Validated @RequestBody(required = true) MainRequestDTO bookingRequest, @ApiIgnore Errors errors) {
+ @Validated @RequestBody(required = true) MainRequestDTO bookingRequest, @Parameter(hidden = true) Errors errors) {
log.info("sessionId", "idType", "id",
"In bookAppoinment method of Booking controller to book an appointment for object: " + bookingRequest);
requestValidator.validateId(BOOKING, bookingRequest.getId(), errors);
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailabilityPK.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailabilityPK.java
index 8c7f2ae7e1a..609d103bb30 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailabilityPK.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailabilityPK.java
@@ -8,8 +8,8 @@
import java.time.LocalDate;
import java.time.LocalTime;
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
+import jakarta.persistence.Column;
+import jakarta.persistence.Embeddable;
import lombok.Getter;
import lombok.Setter;
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailibityEntity.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailibityEntity.java
index 601415e030f..1b620d6aaff 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailibityEntity.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/entity/AvailibityEntity.java
@@ -10,14 +10,14 @@
import java.time.LocalDateTime;
import java.time.LocalTime;
-import javax.persistence.AttributeOverride;
-import javax.persistence.AttributeOverrides;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
+import jakarta.persistence.AttributeOverride;
+import jakarta.persistence.AttributeOverrides;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.IdClass;
+import jakarta.persistence.NamedQuery;
+import jakarta.persistence.Table;
import org.springframework.stereotype.Component;
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/exception/util/BookingExceptionHandler.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/exception/util/BookingExceptionHandler.java
index ded9fabba60..3cca3095bd8 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/exception/util/BookingExceptionHandler.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/exception/util/BookingExceptionHandler.java
@@ -12,8 +12,8 @@
import java.util.List;
import java.util.Map;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -457,7 +457,7 @@ public ResponseEntity> authServiceException(final Notificatio
List errorList = new ArrayList<>();
e.getValidationErrorList().stream().forEach(serviceError -> errorList
.add(new ExceptionJSONInfoDTO(serviceError.getErrorCode(), serviceError.getMessage())));
- MainResponseDTO> errorRes = e.getMainResposneDTO();
+ MainResponseDTO> errorRes = e.getMainResponseDTO();
errorRes.setErrors(errorList);
errorRes.setResponsetime(GenericUtil.getCurrentResponseTime());
return new ResponseEntity<>(errorRes, HttpStatus.OK);
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/repository/BookingAvailabilityRepository.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/repository/BookingAvailabilityRepository.java
index 92e51fd14f9..bc26f3f783d 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/repository/BookingAvailabilityRepository.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/repository/BookingAvailabilityRepository.java
@@ -9,7 +9,7 @@
import java.util.List;
import javax.transaction.Transactional;
-import javax.persistence.LockModeType;
+import jakarta.persistence.LockModeType;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.Lock;
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/BookingService.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/BookingService.java
index f56bdad203d..0df8281bb3d 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/BookingService.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/BookingService.java
@@ -13,7 +13,7 @@
import java.util.TreeMap;
import java.util.stream.Collectors;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/util/BookingServiceUtil.java b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/util/BookingServiceUtil.java
index 6b9520e2c6b..476ec528d18 100644
--- a/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/util/BookingServiceUtil.java
+++ b/pre-registration-booking-service/src/main/java/io/mosip/preregistration/booking/service/util/BookingServiceUtil.java
@@ -20,7 +20,7 @@
import java.util.Map;
import java.util.TimeZone;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
diff --git a/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestConfig.java b/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestConfig.java
index 02ad2a18d25..b124c76179e 100644
--- a/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestConfig.java
+++ b/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestConfig.java
@@ -7,9 +7,11 @@
import javax.net.ssl.SSLContext;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
+import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
+import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
+import org.apache.hc.client5.http.io.HttpClientConnectionManager;
+import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
import org.apache.http.ssl.TrustStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -29,8 +31,11 @@ public RestTemplate selfTokenRestTemplate()
SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
- CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build();
- HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
+ HttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
+ .setSSLSocketFactory(csf).build();
+ CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(connectionManager).build();
+ HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
+
requestFactory.setHttpClient(httpClient);
return new RestTemplate(requestFactory);
diff --git a/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestSecurityConfig.java b/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestSecurityConfig.java
index 5058fd3913f..0844e19fb5f 100644
--- a/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestSecurityConfig.java
+++ b/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/config/TestSecurityConfig.java
@@ -4,7 +4,7 @@
// import java.util.Arrays;
// import java.util.List;
-// import javax.servlet.http.HttpServletResponse;
+// import jakarta.servlet.http.HttpServletResponse;
// import org.springframework.context.annotation.Bean;
// import org.springframework.context.annotation.Configuration;
@@ -27,7 +27,8 @@
// @EnableWebSecurity
// @EnableGlobalMethodSecurity(prePostEnabled = true)
// @Order(2)
-// public class TestSecurityConfig extends WebSecurityConfigurerAdapter {
+// @EnableMethodSecurity
+// public class TestSecurityConfig @EnableGlobalMethodSecurity(prePostEnabled = true){
@@ -63,6 +64,11 @@
// return (request, response, authException) -> response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
// }
+// @Bean
+// protected SecurityFilterChain configureSecurityFilterChain(final HttpSecurity httpSecurity) throws Exception {
+// return httpSecurity.build();
+// }
+
// @Bean
// public UserDetailsService userDetailsService() {
// List users = new ArrayList<>();
diff --git a/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/service/util/BookingServiceUtilTest.java b/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/service/util/BookingServiceUtilTest.java
index 919ee8974cf..caa2dfe867b 100644
--- a/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/service/util/BookingServiceUtilTest.java
+++ b/pre-registration-booking-service/src/test/java/io/mosip/preregistration/booking/test/service/util/BookingServiceUtilTest.java
@@ -51,15 +51,12 @@
import io.mosip.preregistration.booking.dto.RegistrationCenterResponseDto;
import io.mosip.preregistration.booking.dto.SlotDto;
import io.mosip.preregistration.booking.entity.AvailibityEntity;
-import io.mosip.preregistration.booking.errorcodes.ErrorCodes;
-import io.mosip.preregistration.booking.errorcodes.ErrorMessages;
import io.mosip.preregistration.booking.exception.AppointmentReBookingFailedException;
import io.mosip.preregistration.booking.exception.AvailablityNotFoundException;
import io.mosip.preregistration.booking.exception.BookingDateNotSeletectedException;
import io.mosip.preregistration.booking.exception.BookingPreIdNotFoundException;
import io.mosip.preregistration.booking.exception.BookingRegistrationCenterIdNotFoundException;
import io.mosip.preregistration.booking.exception.BookingTimeSlotNotSeletectedException;
-import io.mosip.preregistration.booking.exception.DemographicGetStatusException;
import io.mosip.preregistration.booking.exception.InvalidDateTimeFormatException;
import io.mosip.preregistration.booking.exception.RecordNotFoundException;
import io.mosip.preregistration.booking.exception.TimeSpanException;
@@ -68,18 +65,15 @@
import io.mosip.preregistration.booking.repository.impl.BookingDAO;
import io.mosip.preregistration.booking.service.util.BookingServiceUtil;
import io.mosip.preregistration.core.common.dto.BookingRegistrationDTO;
-import io.mosip.preregistration.core.common.dto.ExceptionJSONInfoDTO;
import io.mosip.preregistration.core.common.dto.MainRequestDTO;
-import io.mosip.preregistration.core.common.dto.MainResponseDTO;
import io.mosip.preregistration.core.common.dto.NotificationDTO;
-import io.mosip.preregistration.core.common.dto.PreRegistartionStatusDTO;
import io.mosip.preregistration.core.common.dto.ResponseWrapper;
import io.mosip.preregistration.core.exception.MasterDataNotAvailableException;
import io.mosip.preregistration.core.exception.RestCallException;
import io.mosip.preregistration.core.util.RequestValidator;
@RunWith(SpringRunner.class)
-@SpringBootTest
+@SpringBootTest(classes = { BookingServiceUtil.class })
public class BookingServiceUtilTest {
@MockBean
diff --git a/pre-registration-booking-service/src/test/resources/application.properties b/pre-registration-booking-service/src/test/resources/application.properties
index 3463fcd79eb..7ee77ec9261 100644
--- a/pre-registration-booking-service/src/test/resources/application.properties
+++ b/pre-registration-booking-service/src/test/resources/application.properties
@@ -1,7 +1,10 @@
-javax.persistence.jdbc.driver=org.h2.Driver
-javax.persistence.jdbc.url=jdbc:h2\:mem\:testdb;DB_CLOSE_DELAY=-1;INIT=RUNSCRIPT FROM 'classpath:create-schema.sql'
-javax.persistence.jdbc.user=sa
-javax.persistence.jdbc.password=
+# javax.persistence.jdbc.driver=org.h2.Driver
+# javax.persistence.jdbc.url=jdbc:h2\:mem\:testdb;DB_CLOSE_DELAY=-1;INIT=RUNSCRIPT FROM 'classpath:create-schema.sql'
+# javax.persistence.jdbc.user=sa
+javax.persistence.jdbc.driver: org.postgresql.Driver
+javax.persistence.jdbc.url=jdbc:postgresql://api-internal.dev1.mosip.net:5432/mosip_prereg
+javax.persistence.jdbc.user: postgres
+javax.persistence.jdbc.password=aRWP1G52uu
mosip.kernel.objectstore.account-name=prereg
cancel.appoinment.template=cancel-appointment
hibernate.hbm2ddl.auto=update
@@ -13,10 +16,10 @@ hibernate.cache.use_second_level_cache=false
hibernate.cache.use_query_cache=false
hibernate.cache.use_structured_entries=false
hibernate.generate_statistics=false
-notification.url=https://dev.mosip.net/notification/notify
+notification.url=https://api-internal.dev1.mosip.net/notification/notify
mosip.supported-languages=eng,ara,fra
mosip.primary-language=eng
-mosip.io.prid.url=https://dev.mosip.net/v1/pridgenerator/prid
+mosip.io.prid.url=https://api-internal.dev1.mosip.net/v1/pridgenerator/prid
# preregistration.country.specific.zoneId=GMT+05:30
booking.resource.url=${dev.dns.url}/preregistration/v1
preregistration.rebook.timespan = 24
@@ -103,8 +106,8 @@ mosip.preregistration.booking.availability.increase.id=mosip.preregistration.boo
mosip.preregistration.booking.availability.check.id=mosip.preregistration.booking.availability.check
mosip.preregistration.booking.delete.old.id=mosip.preregistration.booking.delete.old
mosip.preregistration.booking.exception.id=mosip.preregistration.booking.parse.exception
-mosip.kernel.idobjectvalidator.masterdata.documenttypes.rest.uri=https://dev.mosip.net/v1/masterdata/documenttypes/{documentcategorycode}/{langcode}
-mosip.kernel.masterdata.validdoc.rest.uri==https://dev.mosip.net/masterdata/validdocuments/
+mosip.kernel.idobjectvalidator.masterdata.documenttypes.rest.uri=https://api-internal.dev1.mosip.net/v1/masterdata/documenttypes/{documentcategorycode}/{langcode}
+mosip.kernel.masterdata.validdoc.rest.uri==https://api-internal.dev1.mosip.net/masterdata/validdocuments/
mosip.preregistration.booking.id.book=mosip.preregistration.booking.book
# Name node url for HDFS
@@ -142,7 +145,7 @@ mosip.kernel.prid.restricted-numbers=786,666
mosip.kernel.virus-scanner.host=104.211.200.46
mosip.kernel.virus-scanner.port=3310
-mosip.batch.token.authmanager.url= https://dev.mosip.net/v1/authmanager/authenticate/useridPwd
+mosip.batch.token.authmanager.url= https://api-internal.dev1.mosip.net/v1/authmanager/authenticate/useridPwd
mosip.batch.token.authmanager.appId=ida
mosip.batch.token.authmanager.userName=110005
mosip.batch.token.authmanager.password=mosip
@@ -164,7 +167,10 @@ mosip.security.authentication.provider.beans.list=customJWTAuthProvider
mosip.kernel.auth.appids.realm.map={prereg:'preregistration',ida:'mosip',registrationclient:'mosip',regproc:'mosip',partner:'mosip',resident:'mosip',admin:'mosip',crereq:'mosip',creser:'mosip',datsha:'mosip'}
# To generate token from keycloak. Use by kernel auth adapter.
mosip.iam.adapter.clientid=mosip-prereg-client
-mosip.iam.adapter.clientsecret=abc123
+mosip.iam.adapter.clientsecret=lJmGIMqcfgsZiHh9
mosip.iam.adapter.appid=prereg
# URL to get new Auth Token from OIDC provider & to do online validation of auth token with OIDC provider.
-auth.server.admin.issuer.uri=https://dev.mosip.net/keycloak/auth/realms/
\ No newline at end of file
+# auth.server.admin.issuer.uri=https://api-internal.dev1.mosip.net/keycloak/auth/realms/
+auth.server.admin.issuer.uri=https://iam.dev1.mosip.net/auth/realms/
+
+spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER
\ No newline at end of file