diff --git a/.github/workflows/clear-artifacts.yml b/.github/workflows/clear-artifacts.yml
index c78316f3ebe..6aac15eb2a6 100644
--- a/.github/workflows/clear-artifacts.yml
+++ b/.github/workflows/clear-artifacts.yml
@@ -11,7 +11,7 @@ on:
type: string
jobs:
delete-artifacts:
- uses: mosip/kattu/.github/workflows/clear-artifacts.yml@master
+ uses: mosip/kattu/.github/workflows/clear-artifacts.yml@master-java21
secrets:
ACCESS_TOKEN: ${{ secrets.access_token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
diff --git a/.github/workflows/db-test.yml b/.github/workflows/db-test.yml
index 791f99684d0..24c9e9c1044 100644
--- a/.github/workflows/db-test.yml
+++ b/.github/workflows/db-test.yml
@@ -32,6 +32,6 @@ jobs:
DB_NAME: 'mosip_kernel'
fail-fast: false
name: ${{ matrix.DB_NAME }}
- uses: mosip/kattu/.github/workflows/db-test.yml@master
+ uses: mosip/kattu/.github/workflows/db-test.yml@master-java21
with:
DB_LOCATION: ${{ matrix.DB_LOCATION}}
diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml
index 9b1ec24db09..f3bcba12917 100644
--- a/.github/workflows/push-trigger.yml
+++ b/.github/workflows/push-trigger.yml
@@ -18,12 +18,12 @@ on:
- release*
- master
- 1.*
- - develop
+ - develop*
- MOSIP*
jobs:
build-commons:
- uses: mosip/kattu/.github/workflows/maven-build.yml@master
+ uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./
BUILD_ARTIFACT: commons
@@ -37,7 +37,7 @@ jobs:
publish_to_nexus:
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
needs: build-commons
- 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: ./
secrets:
@@ -51,7 +51,7 @@ jobs:
sonar_analysis:
needs: build-commons
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: ./
secrets:
@@ -83,8 +83,11 @@ jobs:
- SERVICE_LOCATION: 'kernel/kernel-salt-generator'
SERVICE_NAME: 'kernel-salt-generator'
BUILD_ARTIFACT: 'commons'
+ - SERVICE_LOCATION: 'kernel/kernel-config-server'
+ SERVICE_NAME: 'kernel-config-server'
+ BUILD_ARTIFACT: 'commons'
fail-fast: false
- uses: mosip/kattu/.github/workflows/docker-build.yml@master
+ uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21
name: ${{ matrix.SERVICE_NAME }}
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
diff --git a/kernel/kernel-applicanttype-api/pom.xml b/kernel/kernel-applicanttype-api/pom.xml
index 892e1e90918..a2d67b124f4 100644
--- a/kernel/kernel-applicanttype-api/pom.xml
+++ b/kernel/kernel-applicanttype-api/pom.xml
@@ -5,35 +5,38 @@
io.mosip.kernel
kernel-applicanttype-api
Mosip Applicant type API
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
- 11
- 11
- 20180813
- 0.8.5
+ 21
+ 21
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
kernel-core
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
org.mvel
mvel2
- 2.4.10.Final
-
-
-
- org.mvel
- mvel2
- 2.4.10.Final
+ 2.5.2.Final
org.json
json
- ${json.version}
diff --git a/kernel/kernel-applicanttype-api/src/main/java/io/mosip/kernel/applicanttype/api/impl/ApplicantTypeImpl.java b/kernel/kernel-applicanttype-api/src/main/java/io/mosip/kernel/applicanttype/api/impl/ApplicantTypeImpl.java
index 8d0862db949..cc489551e12 100644
--- a/kernel/kernel-applicanttype-api/src/main/java/io/mosip/kernel/applicanttype/api/impl/ApplicantTypeImpl.java
+++ b/kernel/kernel-applicanttype-api/src/main/java/io/mosip/kernel/applicanttype/api/impl/ApplicantTypeImpl.java
@@ -3,7 +3,7 @@
import java.util.HashMap;
import java.util.Map;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.json.JSONException;
import org.json.JSONObject;
diff --git a/kernel/kernel-applicanttype-api/src/test/java/io/mosip/kernel/applicanttype/api/test/ApplicantTypeBootApplication.java b/kernel/kernel-applicanttype-api/src/test/java/io/mosip/kernel/applicanttype/api/test/ApplicantTypeBootApplication.java
index 66e7859cb2a..96e115d3669 100644
--- a/kernel/kernel-applicanttype-api/src/test/java/io/mosip/kernel/applicanttype/api/test/ApplicantTypeBootApplication.java
+++ b/kernel/kernel-applicanttype-api/src/test/java/io/mosip/kernel/applicanttype/api/test/ApplicantTypeBootApplication.java
@@ -2,8 +2,10 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-@SpringBootApplication(scanBasePackages = "io.mosip.kernel.applicanttype.api.*")
+@SpringBootApplication(scanBasePackages = "io.mosip.kernel.applicanttype.api.*", exclude = {
+ DataSourceAutoConfiguration.class })
public class ApplicantTypeBootApplication {
public static void main(String[] args) {
diff --git a/kernel/kernel-authcodeflowproxy-api/pom.xml b/kernel/kernel-authcodeflowproxy-api/pom.xml
index 3ba3ede2f85..4df33864e26 100644
--- a/kernel/kernel-authcodeflowproxy-api/pom.xml
+++ b/kernel/kernel-authcodeflowproxy-api/pom.xml
@@ -4,7 +4,7 @@
4.0.0
io.mosip.kernel
kernel-authcodeflowproxy-api
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
jar
kernel-authcodeflowproxy-api
Mosip commons project
@@ -13,8 +13,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -118,8 +118,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -220,8 +220,8 @@
1.8.12
1.4.2
1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
2.0.0
diff --git a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/controller/LoginController.java b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/controller/LoginController.java
index 602cd7d0157..58bd5fd89ba 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/controller/LoginController.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/controller/LoginController.java
@@ -4,9 +4,9 @@
import java.util.List;
import java.util.UUID;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.Cookie;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
diff --git a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/dto/JWSSignatureRequestDto.java b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/dto/JWSSignatureRequestDto.java
index 1c1bbd24645..c8bfbfed1c3 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/dto/JWSSignatureRequestDto.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/dto/JWSSignatureRequestDto.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.authcodeflowproxy.api.dto;
-import javax.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotBlank;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
diff --git a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/exception/AuthCodeProxyExceptionHandler.java b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/exception/AuthCodeProxyExceptionHandler.java
index adbf343b7d5..748310c3dd3 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/exception/AuthCodeProxyExceptionHandler.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/exception/AuthCodeProxyExceptionHandler.java
@@ -4,7 +4,7 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.Ordered;
diff --git a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/LoginService.java b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/LoginService.java
index 1d739234238..e0525d8980a 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/LoginService.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/LoginService.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.authcodeflowproxy.api.service;
-import javax.servlet.http.Cookie;
+import jakarta.servlet.http.Cookie;
import io.mosip.kernel.authcodeflowproxy.api.dto.AccessTokenResponseDTO;
diff --git a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/impl/LoginServiceImpl.java b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/impl/LoginServiceImpl.java
index c815be75d1a..2dc6dccc295 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/impl/LoginServiceImpl.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/impl/LoginServiceImpl.java
@@ -12,7 +12,7 @@
import java.util.Map;
import java.util.Objects;
-import javax.servlet.http.Cookie;
+import jakarta.servlet.http.Cookie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/validator/ValidateTokenHelper.java b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/validator/ValidateTokenHelper.java
index b0ea910f363..fa6d552401c 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/validator/ValidateTokenHelper.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/main/java/io/mosip/kernel/authcodeflowproxy/api/service/validator/ValidateTokenHelper.java
@@ -14,7 +14,7 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.slf4j.Logger;
diff --git a/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/test/config/TestSecurityConfig.java b/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/test/config/TestSecurityConfig.java
index a0a69cbb73c..e3c62cd1c87 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/test/config/TestSecurityConfig.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/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;
diff --git a/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/test/controller/AuthProxyControllerTests.java b/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/test/controller/AuthProxyControllerTests.java
index 3761e2353cf..4cb974748af 100644
--- a/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/test/controller/AuthProxyControllerTests.java
+++ b/kernel/kernel-authcodeflowproxy-api/src/test/java/io/mosip/kernel/authcodeflowproxy/api/test/controller/AuthProxyControllerTests.java
@@ -48,7 +48,7 @@
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.client.RestTemplate;
-import javax.servlet.http.Cookie;
+import jakarta.servlet.http.Cookie;
import java.net.URI;
import java.time.Instant;
import java.time.ZoneOffset;
diff --git a/kernel/kernel-bioapi-provider/pom.xml b/kernel/kernel-bioapi-provider/pom.xml
index 0e5acbf77a3..e122c4d7504 100644
--- a/kernel/kernel-bioapi-provider/pom.xml
+++ b/kernel/kernel-bioapi-provider/pom.xml
@@ -5,7 +5,7 @@
io.mosip.kernel
kernel-bioapi-provider
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-bioapi-provider
bioapi provider
https://github.com/mosip/commons
@@ -14,8 +14,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -119,8 +119,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -221,9 +221,9 @@
1.8.12
1.4.2
1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
diff --git a/kernel/kernel-biometrics-api/pom.xml b/kernel/kernel-biometrics-api/pom.xml
index 788a4725a17..659a67a62f9 100644
--- a/kernel/kernel-biometrics-api/pom.xml
+++ b/kernel/kernel-biometrics-api/pom.xml
@@ -4,7 +4,7 @@
4.0.0
io.mosip.kernel
kernel-biometrics-api
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-biometrics-api
biometrics api definitions
https://github.com/mosip/commons
@@ -14,8 +14,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -118,8 +118,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -220,8 +220,8 @@
1.8.12
1.4.2
1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
diff --git a/kernel/kernel-bom/pom.xml b/kernel/kernel-bom/pom.xml
new file mode 100644
index 00000000000..73b28bf0bed
--- /dev/null
+++ b/kernel/kernel-bom/pom.xml
@@ -0,0 +1,331 @@
+
+
+ 4.0.0
+
+ 1.2.1-java21-SNAPSHOT
+ io.mosip.kernel
+ kernel-bom
+ pom
+ kernel-bom
+ Kernel Bill Of Materials
+ https://github.com/mosip/commons
+
+ 3.4.3
+ 2.3.2
+ 3.1.0
+ 3.27.0-GA
+ 2.3.1
+ 1.1
+ 2.3.1
+ 1.18.30
+ 1.3
+ 2.2
+ 2.0.1.Final
+ 1.2
+
+ 2.6
+ 3.6.1
+
+ 1.78.1
+
+ 3.0.1
+
+ 1.5.21
+
+ 1.9.21.2
+
+ 4.5.6
+
+ 3.9.13
+ 3.9.4
+
+ 3.8.1
+ 0.18.0
+
+ 6.4
+
+ 2.0.9
+
+ 20180813
+ 1.1.1
+ 0.6.0
+ 3.2.2
+ 2.1.1
+ 1.7.0
+
+ 19.0
+
+ 2.0.7
+
+ **/constant/**,**/config/**,**/httpfilter/**,**/cache/**,**/entity/**,**/model/**,**/exception/**,**/repository/**,**/verticle/**,**/spi/**,"**/proxy/**","**/entities/**","**/filter/**","**/util/**","**/verifier/**"
+ **/dto/**,**/entity/**,**/config/**
+ ${project.basedir}/../
+
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ 3.2.3
+ pom
+ import
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ 2023.0.0
+ pom
+ import
+
+
+ org.mockito
+ mockito-bom
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+ 4.1.1
+
+
+ javax.persistence
+ javax.persistence-api
+ ${javax.persistence.api.version}
+
+
+ javax.transaction
+ javax.transaction-api
+ ${javax.transaction.api.version}
+
+
+ javax.validation
+ validation-api
+ ${javax.validation-api.version}
+
+
+ commons-io
+ commons-io
+ ${commons-io}
+
+
+ org.apache.commons
+ commons-math3
+ ${commons-math3}
+
+
+ org.projectlombok
+ lombok
+ ${lombok-version}
+ compile
+
+
+ org.bouncycastle
+ bcprov-jdk18on
+ ${bouncycastle.version}
+
+
+ javax.interceptor
+ javax.interceptor-api
+ ${javax.interceptor.version}
+
+
+ com.google.code.findbugs
+ annotations
+ ${findbugs.version}
+
+
+ io.swagger
+ swagger-annotations
+ ${swagger.annotations.version}
+
+
+ io.swagger
+ swagger-models
+ ${swagger.annotations.version}
+
+
+ com.auth0
+ java-jwt
+ ${jwt.version}
+
+
+ com.auth0
+ jwks-rsa
+ ${jwks-rsa-version}
+
+
+ javax.xml.bind
+ jaxb-api
+ ${jaxb-api-version}
+
+
+ javax.activation
+ activation
+ ${activation-version}
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ ${jaxb-runtime-version}
+
+
+ org.javassist
+ javassist
+ ${javassist-version}
+
+
+ org.apache.httpcomponents
+ httpclient
+ ${apache.httpcomponents.version}
+
+
+ javax.servlet
+ javax.servlet-api
+ ${javax.servlet-api-version}
+ provided
+
+
+ io.vertx
+ vertx-web
+ ${vertx.version}
+ provided
+
+
+ io.vertx
+ vertx-web-client
+ ${vertx.version}
+
+
+ io.vertx
+ vertx-unit
+ ${vertx.version}
+ test
+
+
+ io.vertx
+ vertx-config-spring-config-server
+ ${vertx.version}
+
+
+ io.vertx
+ vertx-config
+ ${vertx.version}
+
+
+ io.vertx
+ vertx-health-check
+ ${vertx.version}
+
+
+
+ org.quartz-scheduler
+ quartz
+ ${quartz-version}
+
+
+ org.powermock
+ powermock-api-mockito2
+ ${powermock.version}
+ test
+
+
+ org.powermock
+ powermock-module-junit4
+ ${powermock.version}
+ test
+
+
+ net.logstash.logback
+ logstash-logback-encoder
+ ${logstash-logback-encoder-version}
+
+
+ org.json
+ json
+ ${json.version}
+
+
+ io.jsonwebtoken
+ jjwt
+ ${io.jsonwebtoken.jjwt.version}
+
+
+ commons-collections
+ commons-collections
+ ${commons-collections.version}
+
+
+ org.modelmapper
+ modelmapper
+ ${modelmapper.version}
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc.version}
+
+
+ com.googlecode.json-simple
+ json-simple
+ ${json-simple-version}
+
+
+
+ com.google.guava
+ guava
+ ${guava.version}
+
+
+ io.swagger.core.v3
+ swagger-core
+ ${swagger.core.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+
+
+
+
+ org.mockito
+ mockito-core
+ ${mockito-version}
+
+
+ org.mockito
+ mockito-android
+ ${mockito-version}
+
+
+ org.mockito
+ mockito-errorprone
+ ${mockito-version}
+
+
+ org.mockito
+ mockito-junit-jupiter
+ ${mockito-version}
+
+
+ org.mockito
+ mockito-proxy
+ ${mockito-version}
+
+
+ org.mockito
+ mockito-subclass
+ ${mockito-version}
+
+
+
+ com.hazelcast
+ hazelcast
+ ${hazelcast-version}
+
+
+
+
diff --git a/kernel/kernel-config-server/.gitignore b/kernel/kernel-config-server/.gitignore
new file mode 100644
index 00000000000..6b70919dee9
--- /dev/null
+++ b/kernel/kernel-config-server/.gitignore
@@ -0,0 +1,20 @@
+*.class
+.mtj.tmp/
+*.jar
+*.war
+*.ear
+hs_err_pid*
+target/
+.metadata
+.classpath
+.project
+.settings/
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.loadpath
+.DS_Store
\ No newline at end of file
diff --git a/kernel/kernel-config-server/Dockerfile b/kernel/kernel-config-server/Dockerfile
new file mode 100644
index 00000000000..650c02a74ec
--- /dev/null
+++ b/kernel/kernel-config-server/Dockerfile
@@ -0,0 +1,85 @@
+FROM eclipse-temurin:21-jre-alpine
+
+ARG SOURCE
+ARG COMMIT_HASH
+ARG COMMIT_ID
+ARG BUILD_TIME
+LABEL source=${SOURCE}
+LABEL commit_hash=${COMMIT_HASH}
+LABEL commit_id=${COMMIT_ID}
+LABEL build_time=${BUILD_TIME}
+
+
+
+# can be passed during Docker build as build time environment for github branch to pickup configuration from.
+ARG container_user=mosip
+
+# can be passed during Docker build as build time environment for github branch to pickup configuration from.
+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=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 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}
+
+ENV work_dir=/home/${container_user}
+
+
+# can be passed during Docker build as build time environment for keystore location for encryption
+ARG encrypt_keyStore_location
+
+# can be passed during Docker build as build time environment for keystore password for encryption
+ARG encrypt_keyStore_password
+
+# can be passed during Docker build as build time environment for keystore alias for encryption
+ARG encrypt_keyStore_alias
+
+# can be passed during Docker build as build time environment for keystore secret for encryption
+ARG encrypt_keyStore_secret
+
+# environment variable to pass GIT URL at docker runtime
+ENV git_url_env=${git_url}
+
+# environment variable to pass github configuration folder to pickup configuration from, at docker runtime
+ENV git_config_folder_env=${git_config_folder}
+
+# environment variable to pass encryption keystore location at docker runtime
+ENV encrypt_keyStore_location_env=${encrypt_keyStore_location}
+
+# environment variable to pass encryption keystore password at docker runtime
+ENV encrypt_keyStore_password_env=${encrypt_keyStore_password}
+
+# environment variable to pass encryption keystore alias at docker runtime
+ENV encrypt_keyStore_alias_env=${encrypt_keyStore_alias}
+
+# environment variable to pass encryption keystore secret at docker runtime
+ENV encrypt_keyStore_secret_env=${encrypt_keyStore_secret}
+
+#ADD execute-jar.sh execute-jar.sh
+
+#RUN chmod 777 execute-jar.sh
+
+# change permissions of file inside working dir
+RUN chown -R ${container_user}:${container_user} /home/${container_user}
+
+# select container user for all tasks
+USER ${container_user_uid}:${container_user_gid}
+
+
+COPY ./target/kernel-config-server-*.jar kernel-config-server.jar
+
+EXPOSE 51000
+
+#CMD ./execute-jar.sh
+CMD java -jar kernel-config-server.jar
+
diff --git a/kernel/kernel-config-server/Dockerfile-no-updates b/kernel/kernel-config-server/Dockerfile-no-updates
new file mode 100644
index 00000000000..2f2b8cb3adb
--- /dev/null
+++ b/kernel/kernel-config-server/Dockerfile-no-updates
@@ -0,0 +1,41 @@
+FROM openjdk:11
+
+# can be passed during Docker build as build time environment for keystore location for encryption
+ARG encrypt_keyStore_location
+
+# can be passed during Docker build as build time environment for keystore password for encryption
+ARG encrypt_keyStore_password
+
+# can be passed during Docker build as build time environment for keystore alias for encryption
+ARG encrypt_keyStore_alias
+
+# can be passed during Docker build as build time environment for keystore secret for encryption
+ARG encrypt_keyStore_secret
+
+# environment variable to pass GIT URL at docker runtime
+ENV git_url_env=${git_url}
+
+# environment variable to pass github configuration folder to pickup configuration from, at docker runtime
+ENV git_config_folder_env=${git_config_folder}
+
+# environment variable to pass encryption keystore location at docker runtime
+ENV encrypt_keyStore_location_env=${encrypt_keyStore_location}
+
+# environment variable to pass encryption keystore password at docker runtime
+ENV encrypt_keyStore_password_env=${encrypt_keyStore_password}
+
+# environment variable to pass encryption keystore alias at docker runtime
+ENV encrypt_keyStore_alias_env=${encrypt_keyStore_alias}
+
+# environment variable to pass encryption keystore secret at docker runtime
+ENV encrypt_keyStore_secret_env=${encrypt_keyStore_secret}
+
+ADD execute-jar.sh execute-jar.sh
+
+RUN chmod 777 execute-jar.sh
+
+COPY ./target/kernel-config-server-*.jar kernel-config-server.jar
+
+EXPOSE 51000
+
+CMD ./execute-jar.sh
diff --git a/kernel/kernel-config-server/README.md b/kernel/kernel-config-server/README.md
new file mode 100644
index 00000000000..f2ff0838f0a
--- /dev/null
+++ b/kernel/kernel-config-server/README.md
@@ -0,0 +1,159 @@
+## kernel-config-server
+
+[Background & Design]( https://github.com/mosip/mosip/wiki/MOSIP-Configuration-Server )
+
+Default Port and Context Path
+
+```
+server.port=51000
+server.servlet.path=/config
+
+```
+
+**For Encryption Decryption of properties**
+
+Create keystore with following command:
+`keytool -genkeypair -alias -keyalg RSA -keystore server.keystore -storepass --dname "CN=,OU=,O=,L=,S=,C="`
+
+When you run the above command it will ask you for password for < your-alias > , choose your password or press enter for same password as < store-password >
+
+The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format, migrate it using following command:
+`keytool -importkeystore -srckeystore server.keystore -destkeystore server.keystore -deststoretype pkcs12`
+For more information look [here]( https://cloud.spring.io/spring-cloud-config/single/spring-cloud-config.html#_creating_a_key_store_for_testing )
+
+**How To Run**
+
+To run the application:
+Make sure you have configured ssh keys to connect to git, because it will take ssh keys from default location (${user.home}/.ssh) .
+Now run the jar using the following command:
+
+`java -jar -Dspring.cloud.config.server.git.uri=< git-repo-ssh-url > -Dspring.cloud.config.server.git.search-paths=< config-folder-location-in-git-repo > -Dencrypt.keyStore.location=file:///< file-location-of-keystore > -Dencrypt.keyStore.password=< keystore-passowrd > -Dencrypt.keyStore.alias=< keystore-alias > -Dencrypt.keyStore.secret=< keystore-secret > < jar-name >`
+
+
+To run it inside Docker container provide the follwing run time arguments:
+1. git_url_env
+The URL of your Git repo
+
+2. git_config_folder_env
+The folder inside your git repo which contains the configuration
+
+3. encrypt_keyStore_location_env
+The encrypt keystore location
+
+4. encrypt_keyStore_password_env
+The encryption keystore password
+
+5. encrypt_keyStore_alias_env
+The encryption keystore alias
+
+6. encrypt_keyStore_secret_env
+The encryption keyStore secret
+
+The final docker run command should look like:
+
+`docker run --name= -d -v /server.keystore:/server.keystore:z -v /home/madmin/:/.ssh:z -e git_url_env= -e git_config_folder_env= -e encrypt_keyStore_location_env=file:////server.keystore -e encrypt_keyStore_password_env= -e encrypt_keyStore_alias_env= -e encrypt_keyStore_secret_env= -p 51000:51000 `
+
+
+**To Encrypt any property:**
+Run the following command :
+`curl http:////encrypt -d `
+
+And place the encrypted value in client application properties file with the format:
+`password={cipher}`
+
+**To Decrypt any property manually:**
+
+`curl http:////decrypt -d `
+
+**NOTE** There is no need to write decryption mechanism in client applications for encrypted values. They will be automatically decrypted by config server.
+
+
+
+**Application Properties**
+
+```
+#Port where mosip spring cloud config server needs to run
+server.port = 51000
+
+#adding context path
+server.servlet.path=/config
+
+# Uncomment spring.cloud.config.server.git.uri and spring.cloud.config.server.git.search-paths for # connecting to git Repo for configuration.
+#################################################################
+#Git repository location where configuration files are stored
+#spring.cloud.config.server.git.uri=
+
+#Path inside the GIT repo where config files are stored, in our case they are inside config directory
+#spring.cloud.config.server.git.search-paths=
+
+# Uncomment spring.profiles.active and spring.cloud.config.server.native.search-locations for # connecting to local file system for configuration.
+#################################################################
+# spring.profiles.active=native
+
+# spring.cloud.config.server.native.search-locations=file:///
+
+#Server would return a HTTP 404 status, if the application is not found.By default, this flag is set to true.
+spring.cloud.config.server.accept-empty=false
+
+#Spring Cloud Config Server makes a clone of the remote git repository and if somehow the local copy gets
+#dirty (e.g. folder content changes by OS process) so Spring Cloud Config Server cannot update the local copy
+#from remote repository. For Force-pull in such case, we are setting the flag to true.
+spring.cloud.config.server.git.force-pull=true
+
+# Disabling health endpoints to improve performance of config server while in development, can be commented out in production.
+health.config.enabled=false
+
+# Setting up refresh rate to 1 minute so that config server will check for updates in Git repo after every one minute,
+#can be lowered down for production.
+spring.cloud.config.server.git.refreshRate=60
+
+
+# adding provision to clone on start of server instead of first request
+spring.cloud.config.server.git.cloneOnStart=true
+
+#For encryption of properties
+###########################################
+#pass at runtime
+#encrypt.keyStore.location=file:///
+#encrypt.keyStore.password=
+#encrypt.keyStore.alias=
+#encrypt.keyStore.secret=
+
+
+
+```
+
+**Config hierarchy**
+
+
+
+
+
+**Maven dependency for Config client**
+
+```
+
+ org.springframework.cloud
+ spring-cloud-starter-config
+ ${spring-cloud-config.version}
+
+
+```
+
+
+**Config client bootstrap.properties**
+
+```
+spring.cloud.config.uri=http://:
+spring.cloud.config.label=
+spring.application.name=
+spring.cloud.config.name=
+spring.profiles.active=
+management.endpoints.web.exposure.include=refresh
+#management.security.enabled=false
+
+#disabling health check so that client doesnt try to load properties from sprint config server every
+# 5 minutes (should not be done in production)
+spring.cloud.config.server.health.enabled=false
+
+```
diff --git a/kernel/kernel-config-server/execute-jar.sh b/kernel/kernel-config-server/execute-jar.sh
new file mode 100644
index 00000000000..11487b5e795
--- /dev/null
+++ b/kernel/kernel-config-server/execute-jar.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# This scipt will run kernel-config-server.jar inside Docker container according to the run time arguments provided
+# while giving Docker run command
+
+# if all encryption arguments
+if [ "x$encrypt_keyStore_location_env" != "x" ] && [ "x$encrypt_keyStore_password_env" != "x" ] && [ "x$encrypt_keyStore_alias_env" != "x" ] && [ "x$encrypt_keyStore_secret_env" != "x" ];
+ then echo "Encryption has to be done";
+ java -jar -Dspring.cloud.config.server.git.uri=${git_url_env} -Dspring.cloud.config.server.git.search-paths=${git_config_folder_env} -Dencrypt.keyStore.location=${encrypt_keyStore_location_env} -Dencrypt.keyStore.password=${encrypt_keyStore_password_env} -Dencrypt.keyStore.alias=${encrypt_keyStore_alias_env} -Dencrypt.keyStore.secret=${encrypt_keyStore_secret_env} kernel-config-server.jar;
+
+
+# running without encryption
+else
+ echo "Encryption configurations not Passed, Encryption is disabled";
+ java -jar -Dspring.cloud.config.server.git.uri=${git_url_env} -Dspring.cloud.config.server.git.search-paths=${git_config_folder_env} kernel-config-server.jar;
+
+ fi
diff --git a/kernel/kernel-config-server/pom.xml b/kernel/kernel-config-server/pom.xml
new file mode 100644
index 00000000000..3dfaa9ef720
--- /dev/null
+++ b/kernel/kernel-config-server/pom.xml
@@ -0,0 +1,232 @@
+
+
+ 4.0.0
+
+ io.mosip.kernel
+ 1.2.1-java21-SNAPSHOT
+ kernel-config-server
+ Kernel Config Server
+ https://github.com/mosip/commons
+ Config Server for Mosip
+
+
+ UTF-8
+
+
+ 21
+ 21
+ 3.8.0
+ 2.22.0
+
+ 3.0.2
+ 3.1.0
+ 0.8.1
+ 3.7.0.1746
+ 3.2.0
+ 2.3
+
+ 3.2.3
+
+
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.cloud
+ spring-cloud-config-server
+
+
+ org.springframework.cloud
+ spring-cloud-starter-config
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.cloud
+ spring-cloud-starter-bootstrap
+
+
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot-maven-plugin.version}
+
+ true
+
+
+
+
+ repackage
+
+
+
+
+
+ maven-deploy-plugin
+ 2.8.1
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
+
+
+ default-deploy
+ deploy
+
+ deploy
+
+
+
+
+ ossrh
+ https://oss.sonatype.org/
+ false
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ true
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+ none
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ pl.project13.maven
+ git-commit-id-plugin
+ 3.0.1
+
+
+ get-the-git-infos
+
+ revision
+
+ validate
+
+
+
+ true
+ ${project.build.outputDirectory}/service-git.properties
+
+ ^git.build.(time|version)$
+ ^git.commit.id.(abbrev|full)$
+
+ full
+ ${project.basedir}/.git
+
+
+
+
+
+
+ scm:git:git://github.com/mosip/commons.git
+ scm:git:ssh://github.com:mosip/commons.git
+ https://github.com/mosip/commons
+ HEAD
+
+
+
+ MPL 2.0
+ https://www.mozilla.org/en-US/MPL/2.0/
+
+
+
+
+ Mosip
+ mosip.emailnotifier@gmail.com
+ io.mosip
+ https://github.com/mosip/commons
+
+
+
+
diff --git a/kernel/kernel-config-server/src/main/java/META-INF/MANIFEST.MF b/kernel/kernel-config-server/src/main/java/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..254272e1c07
--- /dev/null
+++ b/kernel/kernel-config-server/src/main/java/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/kernel/kernel-config-server/src/main/java/io/mosip/kernel/config/server/ConfigServerBootApplication.java b/kernel/kernel-config-server/src/main/java/io/mosip/kernel/config/server/ConfigServerBootApplication.java
new file mode 100644
index 00000000000..079198526bc
--- /dev/null
+++ b/kernel/kernel-config-server/src/main/java/io/mosip/kernel/config/server/ConfigServerBootApplication.java
@@ -0,0 +1,26 @@
+package io.mosip.kernel.config.server;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.config.server.EnableConfigServer;
+
+/**
+ * Config Server application
+ *
+ * @author Swati Raj
+ * @since 1.0.0
+ *
+ */
+@SpringBootApplication
+@EnableConfigServer
+public class ConfigServerBootApplication {
+
+ /**
+ * Main method to run spring boot application
+ *
+ * @param args args
+ */
+ public static void main(String[] args) {
+ SpringApplication.run(ConfigServerBootApplication.class, args);
+ }
+}
diff --git a/kernel/kernel-config-server/src/main/java/io/mosip/kernel/config/server/controller/RefreshController.java b/kernel/kernel-config-server/src/main/java/io/mosip/kernel/config/server/controller/RefreshController.java
new file mode 100644
index 00000000000..4f5abcca30d
--- /dev/null
+++ b/kernel/kernel-config-server/src/main/java/io/mosip/kernel/config/server/controller/RefreshController.java
@@ -0,0 +1,87 @@
+package io.mosip.kernel.config.server.controller;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.client.ServiceInstance;
+import org.springframework.cloud.client.discovery.DiscoveryClient;
+import org.springframework.http.*;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@RestController
+public class RefreshController {
+
+ private static final Logger logger = LoggerFactory.getLogger(RefreshController.class);
+
+ @Autowired
+ private DiscoveryClient discoveryClient;
+
+ @Value("${spring.application.name}")
+ private String applicationName;
+
+ @Value("#{${mosip.config.dnd.services}}")
+ private List dndServices;
+
+ private String URL_TEMPLATE = "%s/actuator/refresh";
+ private RestTemplate restTemplate;
+
+ @GetMapping("/refresh")
+ public Map refreshContext(@RequestParam("servicename") String serviceName) {
+ logger.info("refreshContext invoked with serviceName : {}", serviceName);
+ Map result = new HashMap<>();
+
+ if(Objects.nonNull(discoveryClient)) {
+ try {
+ List serviceIds = serviceName.isBlank() ? discoveryClient.getServices() :
+ discoveryClient.getServices().stream()
+ .filter(s -> s.contains(serviceName) || s.equals(serviceName)).collect(Collectors.toList());
+
+ logger.info("shortlisted serviceIds : {}", serviceIds);
+
+ serviceIds.stream()
+ .dropWhile(s -> isDNDService(s) )
+ .forEach(s -> this.invokeRefreshActuatorEndpoint(s,discoveryClient.getInstances(s),result));
+
+ } catch (Throwable t) {
+ logger.error("Failed to refresh contexts", t);
+ }
+ }
+ logger.info("refreshContext completed");
+ return result;
+ }
+
+ private boolean isDNDService(String serviceId) {
+ if(serviceId.equals(applicationName) || (dndServices!=null && dndServices.contains(serviceId))) {
+ logger.info("DND service found, ignoring refresh attempt! serviceId : {} ", serviceId);
+ return true;
+ }
+ return false;
+ }
+
+ private void invokeRefreshActuatorEndpoint(String serviceId, List instances, Map result) {
+ if(Objects.nonNull(instances)) {
+ restTemplate = new RestTemplate();
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_JSON);
+ HttpEntity httpEntity = new HttpEntity(null, headers);
+
+ for (ServiceInstance instance : instances) {
+ logger.info("Refresh actuator invoked on serviceId: {} and instance : {} ", serviceId, instance.getUri());
+ String url = String.format(URL_TEMPLATE, instance.getUri().toString());
+ ResponseEntity resp = restTemplate.exchange(url, HttpMethod.POST, httpEntity, String.class);
+ result.put(url, resp.getStatusCode().toString());
+ logger.info("{} response : {}", url, resp);
+ }
+ }
+ }
+}
diff --git a/kernel/kernel-config-server/src/main/resources/bootstrap.properties b/kernel/kernel-config-server/src/main/resources/bootstrap.properties
new file mode 100644
index 00000000000..088020c6c6f
--- /dev/null
+++ b/kernel/kernel-config-server/src/main/resources/bootstrap.properties
@@ -0,0 +1,59 @@
+spring.application.name=kernel-config-service
+
+#management.security.enabled=false
+#management.endpoint.health.show-details=when-authorized
+#management.endpoints.web.exposure.include=*
+management.endpoint.health.show-details=always
+management.endpoints.web.exposure.include=info,health
+
+#Port where mosip spring cloud config server needs to run
+server.port = 51000
+
+#adding context path
+server.servlet.path=/config
+server.servlet.context-path=${server.servlet.path}
+
+
+# Uncomment spring.cloud.config.server.git.uri and spring.cloud.config.server.git.search-paths for # connecting to git Repo for configuration.
+#################################################################
+#Git repository location where configuration files are stored
+#spring.cloud.config.server.git.uri=
+
+#Path inside the GIT repo where config files are stored, in our case they are inside config directory
+#spring.cloud.config.server.git.search-paths=
+
+# Uncomment spring.profiles.active and spring.cloud.config.server.native.search-locations for # connecting to local file system for configuration.
+#################################################################
+#spring.profiles.active=native
+
+#spring.cloud.config.server.native.search-locations=file:///
+
+#Server would return a HTTP 404 status, if the application is not found.By default, this flag is set to true.
+spring.cloud.config.server.accept-empty=false
+
+#Spring Cloud Config Server makes a clone of the remote git repository and if somehow the local copy gets
+#dirty (e.g. folder content changes by OS process) so Spring Cloud Config Server cannot update the local copy
+#from remote repository. For Force-pull in such case, we are setting the flag to true.
+spring.cloud.config.server.git.force-pull=true
+
+# Disabling health endpoints to improve performance of config server while in development, can be commented out in production.
+health.config.enabled=false
+
+# Setting up refresh rate to 5 seconds so that config server will check for updates in Git repo after every one minute,
+#can be lowered down for production.
+spring.cloud.config.server.git.refreshRate=5
+
+
+# adding provision to clone on start of server instead of first request
+spring.cloud.config.server.git.cloneOnStart=true
+
+#For encryption of properties
+###########################################
+#pass at runtime
+#encrypt.keyStore.location=file:///
+#encrypt.keyStore.password=
+#encrypt.keyStore.alias=
+#encrypt.keyStore.secret=
+
+mosip.config.dnd.services={'consul','kernel-config-service'}
+
diff --git a/kernel/kernel-config-server/src/main/resources/logback.xml b/kernel/kernel-config-server/src/main/resources/logback.xml
new file mode 100644
index 00000000000..9f80a827ab0
--- /dev/null
+++ b/kernel/kernel-config-server/src/main/resources/logback.xml
@@ -0,0 +1,21 @@
+
+
+
+ %d [%t] %p [%C{1}].%M.%L : %m%n
+
+
+
+ logs/kernel-config-server.log
+ true
+ true
+
+ %d [%t] %p [%C{1}].%M.%L : %m%n
+
+
+
+
+
+
+
+
diff --git a/kernel/kernel-core/pom.xml b/kernel/kernel-core/pom.xml
index 23c941784c7..e2aaeefc839 100644
--- a/kernel/kernel-core/pom.xml
+++ b/kernel/kernel-core/pom.xml
@@ -5,342 +5,257 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4.0.0
io.mosip.kernel
+ 1.2.1-java21-SNAPSHOT
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
-
3.0.2
3.1.0
-
-
- 3.2.0
+ 3.6.3
2.3
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
- 1.2.1.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.13.1
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.12.0
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 3.8.1
- 2.22.0
- 0.8.5
- 2.12.0
- 2.12.0
+ 0.8.11
**/constant/**,**/config/**,**/httpfilter/**,**/cache/**,**/entity/**,**/model/**,**/exception/**,**/repository/**,**/verticle/**,**/spi/**,"**/proxy/**","**/entities/**","**/filter/**","**/util/**","**/verifier/**","**/jaxbclasses/**"
kernel-core
- 1.2.1-SNAPSHOT
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
- org.springframework.boot
- spring-boot-starter
- ${spring.boot.version}
-
-
- org.apache.logging.log4j
- log4j-to-slf4j
-
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- ${spring.boot.version}
-
-
- org.springframework.data
- spring-data-jpa
- ${spring.data.jpa.version}
-
-
- com.h2database
- h2
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
- ${spring.boot.version}
-
-
- javax.persistence
- javax.persistence-api
- ${javax.persistence.api.version}
-
-
- javax.transaction
- javax.transaction-api
- ${javax.transaction.api.version}
-
-
- javax.validation
- validation-api
- ${javax.validation-api.version}
-
-
- commons-io
- commons-io
- ${commons-io}
-
-
- junit
- junit
- ${junit.version}
- test
-
-
- org.apache.commons
- commons-math3
- ${commons-math3}
-
-
- org.apache.commons
- commons-lang3
- ${commons-lang3}
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson.databind}
-
-
- org.projectlombok
- lombok
- ${lombok.version}
- compile
-
-
- org.bouncycastle
- bcprov-jdk15on
- ${bouncycastle.version}
-
-
- commons-codec
- commons-codec
- ${commons-codec}
-
-
- javax.interceptor
- javax.interceptor-api
- ${javax.interceptor.version}
-
-
- com.google.code.findbugs
- annotations
- ${findbugs.version}
-
-
- io.swagger
- swagger-annotations
- ${swagger.annotations.version}
-
-
- io.swagger
- swagger-models
- ${swagger.annotations.version}
-
-
- com.auth0
- java-jwt
- ${jwt.version}
-
-
- io.micrometer
- micrometer-core
- ${micrometer.core.version}
-
-
- io.micrometer
- micrometer-registry-prometheus
- ${micrometer.registry.prometheus.version}
-
-
- org.slf4j
- jul-to-slf4j
- ${jcl.to.slf4j.version}
-
-
- org.slf4j
- jcl-over-slf4j
- ${jcl.to.slf4j.version}
-
-
- javax.xml.bind
- jaxb-api
- 2.3.1
-
-
- javax.activation
- activation
- 1.1
-
-
- org.glassfish.jaxb
- jaxb-runtime
- 2.3.1
-
-
- org.javassist
- javassist
- 3.27.0-GA
-
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
- ${spring-cloud-config.version}
-
-
- org.mockito
- mockito-core
- ${mockito.core.version}
-
-
- org.apache.httpcomponents
- httpclient
- ${apache.httpcomponents.version}
-
-
- org.springframework.boot
- spring-boot-starter-actuator
- ${spring.boot.version}
-
-
- org.springframework.cloud
- spring-cloud-starter-config
- ${spring-cloud-config.version}
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
- provided
-
-
- org.apache.tomcat.embed
- tomcat-embed-core
- 8.5.55
- compile
-
-
- com.fasterxml.jackson.datatype
- jackson-datatype-jsr310
- ${fasterxml.jackson.module.jsr310.version}
-
-
- org.springframework.retry
- spring-retry
- ${spring.retry.version}
-
-
- org.springframework
- spring-core
-
-
-
-
- com.fasterxml.jackson.module
- jackson-module-afterburner
- ${fasterxml.jackson.module.afterburner.version}
-
-
- io.vertx
- vertx-web
- ${vertx.version}
- provided
-
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ org.springframework.data
+ spring-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+ org.springframework.cloud
+ spring-cloud-starter-config
+
+
+ org.springframework.cloud
+ spring-cloud-starter-bootstrap
+
+
+ javax.persistence
+ javax.persistence-api
+
+
+ javax.transaction
+ javax.transaction-api
+
+
+ javax.validation
+ validation-api
+
+
+ junit
+ junit
+
+
+ commons-io
+ commons-io
+
+
+ org.apache.commons
+ commons-math3
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ org.projectlombok
+ lombok
+ compile
+
+
+ org.bouncycastle
+ bcprov-jdk18on
+
+
+ commons-codec
+ commons-codec
+
+
+ javax.interceptor
+ javax.interceptor-api
+
+
+ com.google.code.findbugs
+ annotations
+
+
+ io.swagger
+ swagger-annotations
+
+
+ io.swagger
+ swagger-models
+
+
+ com.auth0
+ java-jwt
+
+
+ io.micrometer
+ micrometer-core
+
+
+ io.micrometer
+ micrometer-registry-prometheus
+
+
+ org.slf4j
+ jul-to-slf4j
+
+
+ org.slf4j
+ jcl-over-slf4j
+
+
+ javax.xml.bind
+ jaxb-api
+
+
+ javax.activation
+ activation
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+
+
+ org.javassist
+ javassist
+
+
+
+ io.micrometer
+ micrometer-tracing
+
+
+ io.micrometer
+ micrometer-tracing-bridge-brave
+
+
+
+ org.aspectj
+ aspectjweaver
+
+
+ org.mockito
+ mockito-core
+
+
+ org.apache.httpcomponents
+ httpclient
+
+
+ org.apache.httpcomponents.client5
+ httpclient5
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+ compile
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+ org.springframework.retry
+ spring-retry
+
+
+ com.fasterxml.jackson.module
+ jackson-module-afterburner
+
+
+ io.vertx
+ vertx-web
+ provided
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.apache.logging.log4j
+ log4j-core
+
+
+ ch.qos.logback
+ logback-core
+
+
+ ch.qos.logback
+ logback-classic
+
+
+ org.quartz-scheduler
+ quartz
+
+
+ com.zaxxer
+ HikariCP-java7
+
+
+
+
+ jakarta.persistence
+ jakarta.persistence-api
+
+
+ net.colesico.framework
+ colesico-hikaricp
+ 5.3.0
+
+
+ jakarta.validation
+ jakarta.validation-api
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
@@ -406,7 +321,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.2.0
+ ${maven.javadoc.version}
attach-javadocs
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/PasswordDto.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/PasswordDto.java
index c81d870191e..f39075b3f76 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/PasswordDto.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/PasswordDto.java
@@ -1,7 +1,7 @@
package io.mosip.kernel.core.authmanager.model;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.Pattern;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Pattern;
import lombok.Data;
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/RefreshTokenRequest.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/RefreshTokenRequest.java
index c0d92554a44..34245ef20f7 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/RefreshTokenRequest.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/RefreshTokenRequest.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.core.authmanager.model;
-import javax.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserOtp.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserOtp.java
index a800bbb1180..26fa30a87b8 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserOtp.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserOtp.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.core.authmanager.model;
-import javax.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotBlank;
import lombok.Data;
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserPasswordRequestDto.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserPasswordRequestDto.java
index 099cb5ee06c..1b1a3311c6f 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserPasswordRequestDto.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserPasswordRequestDto.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.core.authmanager.model;
-import javax.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotBlank;
import io.mosip.kernel.core.authmanager.constant.AuthConstant;
import lombok.AllArgsConstructor;
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserRegistrationRequestDto.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserRegistrationRequestDto.java
index aa1e87f190f..446d79500eb 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserRegistrationRequestDto.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/authmanager/model/UserRegistrationRequestDto.java
@@ -2,7 +2,7 @@
import java.time.LocalDate;
-import javax.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotBlank;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/dataaccess/spi/config/BaseDaoConfig.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/dataaccess/spi/config/BaseDaoConfig.java
index 825fd812b4e..22c41c9e1e0 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/dataaccess/spi/config/BaseDaoConfig.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/dataaccess/spi/config/BaseDaoConfig.java
@@ -5,7 +5,6 @@
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.springframework.beans.factory.FactoryBean;
@@ -14,6 +13,9 @@
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.transaction.PlatformTransactionManager;
+import jakarta.persistence.EntityManagerFactory;
+
+
/**
* This class declares the interface for @Bean methods related to data access
* and will be processed by the Spring container to generate bean definitions
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/RequestWrapper.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/RequestWrapper.java
index 41904409bf8..ed7cd1cf94b 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/RequestWrapper.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/RequestWrapper.java
@@ -2,8 +2,8 @@
import java.time.LocalDateTime;
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/ResponseWrapper.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/ResponseWrapper.java
index f394de0fc72..0b89066c71a 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/ResponseWrapper.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/http/ResponseWrapper.java
@@ -5,8 +5,8 @@
import java.util.ArrayList;
import java.util.List;
-import javax.validation.Valid;
-import javax.validation.constraints.NotNull;
+import jakarta.validation.Valid;
+import jakarta.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthLoggingAutoConfiguration.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthLoggingAutoConfiguration.java
index de2df8f8783..20d83f67c2c 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthLoggingAutoConfiguration.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthLoggingAutoConfiguration.java
@@ -1,40 +1,44 @@
package io.mosip.kernel.core.logger.config;
-import brave.Tracer;
-import ch.qos.logback.classic.helpers.MDCInsertingServletFilter;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.ConfigurableWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.Lazy;
+
+import ch.qos.logback.classic.helpers.MDCInsertingServletFilter;
+import io.micrometer.tracing.Tracer;
@ConditionalOnProperty(value = "spring.sleuth.enabled", matchIfMissing = true)
@Configuration
-@ComponentScan(basePackages = { "org.springframework.cloud.sleuth.autoconfig.*"})
+//@ComponentScan(basePackages = { "org.springframework.cloud.sleuth.autoconfig.*"})
+@Import({BraveAutoConfiguration.class})
public class SleuthLoggingAutoConfiguration implements WebServerFactoryCustomizer {
- @Autowired
- private SleuthValve sleuthValve;
+ @Autowired
+ private Tracer tracer;
+
@Bean
public MDCInsertingServletFilter mdcInsertingServletFilter() {
return new MDCInsertingServletFilter();
}
@Bean
- public SleuthValve sleuthValve(Tracer tracer) {
- sleuthValve = new SleuthValve(tracer);
- return sleuthValve;
+ public SleuthValve sleuthValve() {
+ return new SleuthValve(tracer);
}
@Override
public void customize(ConfigurableWebServerFactory factory) {
if(factory instanceof TomcatServletWebServerFactory) {
((TomcatServletWebServerFactory)factory).addContextCustomizers(context ->
- context.getPipeline().addValve(sleuthValve));
+ context.getPipeline().addValve(sleuthValve()));
}
}
}
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthValve.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthValve.java
index d3fb174378f..f70beefc4f3 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthValve.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/logger/config/SleuthValve.java
@@ -1,20 +1,23 @@
package io.mosip.kernel.core.logger.config;
-import brave.Span;
-import brave.Tracer;
+import java.io.IOException;
+
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.LifecycleState;
import org.apache.catalina.Valve;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
-import org.apache.catalina.valves.ValveBase;
+import org.apache.catalina.valves.AccessLogValve;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.http.MimeHeaders;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.servlet.ServletException;
-import java.io.IOException;
+import io.micrometer.tracing.Span;
+import io.micrometer.tracing.Tracer;
+import jakarta.servlet.ServletException;
-public class SleuthValve extends ValveBase {
+public class SleuthValve extends AccessLogValve {
private Logger logger = LoggerFactory.getLogger(SleuthValve.class);
private static final String TRACE_ID_NAME = "X-B3-TraceId";
@@ -41,9 +44,9 @@ private void enrichWithSleuthHeaderWhenMissing(Request request) {
if (null == header) {
org.apache.coyote.Request coyoteRequest = request.getCoyoteRequest();
MimeHeaders mimeHeaders = coyoteRequest.getMimeHeaders();
- Span span = tracer.newTrace();
- addHeader(mimeHeaders, TRACE_ID_NAME, span.context().traceIdString());
- addHeader(mimeHeaders, SPAN_ID_NAME, span.context().spanIdString());
+ Span span = tracer.nextSpan();
+ addHeader(mimeHeaders, TRACE_ID_NAME, span.context().traceId());
+ addHeader(mimeHeaders, SPAN_ID_NAME, span.context().spanId());
}
}
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CalendarUtils.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CalendarUtils.java
index f53c9cf6c7f..4e1de2db261 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CalendarUtils.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CalendarUtils.java
@@ -42,6 +42,9 @@ public static Calendar getCeiling(Calendar calendar, int field) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
} catch (java.lang.ArithmeticException exception) {
throw new ArithmeticException(CalendarUtilConstants.ARITHMETIC_EXCEPTION_CODE.getErrorCode(),
CalendarUtilConstants.YEAR_OVERFLOW_MESSAGE.getErrorCode(), exception.getCause());
@@ -64,6 +67,9 @@ public static long getFragmentInDays(Calendar calendar, int fragment) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -85,6 +91,9 @@ public static long getFragmentInHours(Calendar calendar, int fragment) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -105,6 +114,9 @@ public static long getFragmentInMilliseconds(Calendar calendar, int fragment) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -124,6 +136,9 @@ public static long getFragmentInMinutes(Calendar calendar, int fragment) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -143,6 +158,9 @@ public static long getFragmentInSeconds(Calendar calendar, int fragment) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -160,6 +178,9 @@ public static boolean isSameDay(Calendar cal1, Calendar cal2) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -178,6 +199,9 @@ public static boolean isSameInstant(Calendar cal1, Calendar cal2) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -197,6 +221,9 @@ public static boolean isSameLocalTime(Calendar cal1, Calendar cal2) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -215,6 +242,9 @@ public static Calendar getRound(Calendar calendar, int field) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
} catch (java.lang.ArithmeticException exception) {
throw new ArithmeticException(CalendarUtilConstants.ARITHMETIC_EXCEPTION_CODE.getErrorCode(),
CalendarUtilConstants.YEAR_OVERFLOW_MESSAGE.getErrorCode(), exception.getCause());
@@ -267,6 +297,9 @@ public static Calendar truncate(Calendar date, int field) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
} catch (java.lang.ArithmeticException exception) {
throw new ArithmeticException(CalendarUtilConstants.ARITHMETIC_EXCEPTION_CODE.getErrorCode(),
CalendarUtilConstants.YEAR_OVERFLOW_MESSAGE.getErrorCode(), exception.getCause());
@@ -289,6 +322,9 @@ public static boolean truncatedEquals(Calendar cal1, Calendar cal2, int field) {
} catch (java.lang.IllegalArgumentException exception) {
throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
}
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CryptoUtil.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CryptoUtil.java
index 17b5a61e839..0ef2724056b 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CryptoUtil.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/CryptoUtil.java
@@ -33,7 +33,7 @@
*/
public class CryptoUtil {
- private static final String SYMMETRIC_ALGORITHM = "AES/GCM/PKCS5Padding";
+ private static final String SYMMETRIC_ALGORITHM = "AES/GCM/NoPadding";
private static final String AES = "AES";
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/DateUtils.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/DateUtils.java
index 3ba134e6fbc..e5b525e107d 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/DateUtils.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/DateUtils.java
@@ -35,6 +35,7 @@
import org.apache.commons.lang3.time.DateFormatUtils;
import io.mosip.kernel.core.exception.IllegalArgumentException;
+import io.mosip.kernel.core.util.constant.CalendarUtilConstants;
import io.mosip.kernel.core.util.constant.DateUtilConstants;
/**
@@ -83,6 +84,9 @@ public static Date addDays(final Date date, final int days) {
} catch (java.lang.IllegalArgumentException e) {
throw new IllegalArgumentException(DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getErrorCode(),
DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getEexceptionMessage(), e.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -104,6 +108,9 @@ public static Date addHours(final Date date, final int hours) {
} catch (java.lang.IllegalArgumentException e) {
throw new IllegalArgumentException(DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getErrorCode(),
DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getEexceptionMessage(), e.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -125,6 +132,9 @@ public static Date addMinutes(final Date date, final int minutes) {
} catch (java.lang.IllegalArgumentException e) {
throw new IllegalArgumentException(DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getErrorCode(),
DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getEexceptionMessage(), e.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
@@ -146,6 +156,9 @@ public static Date addSeconds(final Date date, final int seconds) {
} catch (java.lang.IllegalArgumentException e) {
throw new IllegalArgumentException(DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getErrorCode(),
DateUtilConstants.ILLEGALARGUMENT_ERROR_CODE.getEexceptionMessage(), e.getCause());
+ } catch (java.lang.NullPointerException exception) {
+ throw new IllegalArgumentException(CalendarUtilConstants.ILLEGAL_ARGUMENT_CODE.getErrorCode(),
+ CalendarUtilConstants.ILLEGAL_ARGUMENT_MESSAGE.getErrorCode(), exception.getCause());
}
}
diff --git a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/StringUtils.java b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/StringUtils.java
index 3f0a69f0e11..0c6d21439f1 100644
--- a/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/StringUtils.java
+++ b/kernel/kernel-core/src/main/java/io/mosip/kernel/core/util/StringUtils.java
@@ -21,6 +21,7 @@
import io.mosip.kernel.core.exception.ArrayIndexOutOfBoundsException;
import io.mosip.kernel.core.exception.IllegalArgumentException;
import io.mosip.kernel.core.exception.PatternSyntaxException;
+import io.mosip.kernel.core.util.constant.CalendarUtilConstants;
import io.mosip.kernel.core.util.constant.StringUtilConstants;
/**
@@ -620,6 +621,10 @@ public static String join(Object[] array, char separator, int startIndex, int en
throw new ArrayIndexOutOfBoundsException(
StringUtilConstants.MOSIP_ARRAY_INDEX_OUT_OF_BOUNDS_ERROR_CODE.getErrorCode(),
StringUtilConstants.MOSIP_ARRAY_INDEX_OUT_OF_BOUNDS_ERROR_CODE.getErrorMessage(), e.getCause());
+ } catch (java.lang.IllegalArgumentException e) {
+ throw new ArrayIndexOutOfBoundsException(
+ StringUtilConstants.MOSIP_ARRAY_INDEX_OUT_OF_BOUNDS_ERROR_CODE.getErrorCode(),
+ StringUtilConstants.MOSIP_ARRAY_INDEX_OUT_OF_BOUNDS_ERROR_CODE.getErrorMessage(), e.getCause());
}
}
diff --git a/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryAspectTest.java b/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryAspectTest.java
index 00d9d36f096..bbb3670047b 100644
--- a/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryAspectTest.java
+++ b/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryAspectTest.java
@@ -11,7 +11,6 @@
import org.springframework.aop.aspectj.annotation.AspectJProxyFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
diff --git a/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryUtilTest.java b/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryUtilTest.java
index 1c2316c12a2..67e477dd15a 100644
--- a/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryUtilTest.java
+++ b/kernel/kernel-core/src/test/java/io/mosip/kernel/core/retry/RetryUtilTest.java
@@ -10,7 +10,6 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
diff --git a/kernel/kernel-dataaccess-hibernate/pom.xml b/kernel/kernel-dataaccess-hibernate/pom.xml
index 5c2f275bf11..d8415f3042f 100644
--- a/kernel/kernel-dataaccess-hibernate/pom.xml
+++ b/kernel/kernel-dataaccess-hibernate/pom.xml
@@ -5,117 +5,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4.0.0
io.mosip.kernel
+ kernel-dataaccess-hibernate
+ 1.2.1-java21-SNAPSHOT
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
+ 21
+ 21
3.8.0
@@ -126,102 +23,20 @@
3.2.0
2.3
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
-
- kernel-dataaccess-hibernate
- 1.2.1-SNAPSHOT
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -231,35 +46,18 @@
org.springframework.boot
spring-boot-starter-data-jpa
- ${spring.boot.version}
-
-
- com.h2database
- h2
-
-
+
+
+ org.hibernate.orm
+ hibernate-hikaricp
org.springframework.boot
spring-boot-starter-validation
- ${spring.boot.version}
-
-
- com.h2database
- h2
-
-
org.springframework.boot
spring-boot-starter-web
- ${spring.boot.version}
-
-
- com.h2database
- h2
- ${h2.version}
- runtime
diff --git a/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/config/HibernateDaoConfig.java b/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/config/HibernateDaoConfig.java
index 42b20b45adc..a6f185fef74 100644
--- a/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/config/HibernateDaoConfig.java
+++ b/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/config/HibernateDaoConfig.java
@@ -3,7 +3,6 @@
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.slf4j.Logger;
@@ -152,7 +151,7 @@ public JpaDialect jpaDialect() {
*/
@Override
@Bean
- public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
+ public PlatformTransactionManager transactionManager(jakarta.persistence.EntityManagerFactory entityManagerFactory) {
JpaTransactionManager jpaTransactionManager = new JpaTransactionManager(entityManagerFactory);
jpaTransactionManager.setDataSource(dataSource());
jpaTransactionManager.setJpaDialect(jpaDialect());
diff --git a/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/constant/HibernatePersistenceConstant.java b/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/constant/HibernatePersistenceConstant.java
index a2656bbab88..b0ec0ef98ef 100644
--- a/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/constant/HibernatePersistenceConstant.java
+++ b/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/constant/HibernatePersistenceConstant.java
@@ -51,7 +51,7 @@ private HibernatePersistenceConstant() {
/**
* The string constant my sql dialect
*/
- public static final String POSTGRESQL_95_DIALECT = "org.hibernate.dialect.PostgreSQL95Dialect";
+ public static final String POSTGRESQL_95_DIALECT = "org.hibernate.dialect.PostgreSQLDialect";
/**
* The string constant for hibernate statistics
*/
diff --git a/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/repository/impl/HibernateRepositoryImpl.java b/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/repository/impl/HibernateRepositoryImpl.java
index 52f141ac515..e5e0fbbd54e 100644
--- a/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/repository/impl/HibernateRepositoryImpl.java
+++ b/kernel/kernel-dataaccess-hibernate/src/main/java/io/mosip/kernel/dataaccess/hibernate/repository/impl/HibernateRepositoryImpl.java
@@ -3,12 +3,9 @@
import java.util.List;
import java.util.Map;
-import javax.persistence.CacheStoreMode;
-import javax.persistence.EntityManager;
-import javax.persistence.NoResultException;
-import javax.persistence.PersistenceContext;
-import javax.persistence.Query;
-import javax.persistence.criteria.CriteriaQuery;
+import jakarta.persistence.CacheStoreMode;
+import jakarta.persistence.NoResultException;
+import jakarta.persistence.PersistenceContext;
import org.hibernate.HibernateException;
import org.springframework.data.jpa.repository.support.JpaEntityInformation;
@@ -19,6 +16,9 @@
import io.mosip.kernel.core.dataaccess.spi.repository.BaseRepository;
import io.mosip.kernel.dataaccess.hibernate.constant.HibernateErrorCode;
import io.mosip.kernel.dataaccess.hibernate.constant.HibernatePersistenceConstant;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.Query;
+import jakarta.persistence.criteria.CriteriaQuery;
/**
* Hibernate implementation of the {@link BaseRepository} interface.
diff --git a/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/HibernateRepositoryTest.java b/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/HibernateRepositoryTest.java
index 02ee194c04f..01d2fe56085 100644
--- a/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/HibernateRepositoryTest.java
+++ b/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/HibernateRepositoryTest.java
@@ -8,11 +8,11 @@
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.EntityManager;
-import javax.persistence.NoResultException;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.NoResultException;
+import jakarta.persistence.TypedQuery;
+import jakarta.persistence.criteria.CriteriaBuilder;
+import jakarta.persistence.criteria.CriteriaQuery;
import org.hibernate.HibernateException;
import org.junit.Before;
diff --git a/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/model/Person.java b/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/model/Person.java
index 23c6c28dbc2..a7bb800c6d2 100644
--- a/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/model/Person.java
+++ b/kernel/kernel-dataaccess-hibernate/src/test/java/io/mosip/kernel/dataaccess/hibernate/test/model/Person.java
@@ -3,8 +3,8 @@
*/
package io.mosip.kernel.dataaccess.hibernate.test.model;
-import javax.persistence.Entity;
-import javax.persistence.Table;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Table;
/**
* @author Dharmesh Khandelwal
@@ -15,7 +15,7 @@
@Table(name = "Person", schema = "kernel")
public class Person {
- @javax.persistence.Id
+ @jakarta.persistence.Id
private int Id;
private String name;
diff --git a/kernel/kernel-datamapper-orika/pom.xml b/kernel/kernel-datamapper-orika/pom.xml
index 29c8441c5c5..ecb4014ab1f 100644
--- a/kernel/kernel-datamapper-orika/pom.xml
+++ b/kernel/kernel-datamapper-orika/pom.xml
@@ -7,7 +7,7 @@
io.mosip.kernel
kernel-datamapper-orika
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-datamapper-orika
http://maven.apache.org
Mosip commons project
@@ -15,216 +15,13 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
-
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
- 1.2.1-SNAPSHOT
- 0.8.5
@@ -375,8 +172,9 @@
false
false
- ${argLine} --add-opens
- java.xml/jdk.xml.internal=ALL-UNNAMED
+ ${argLine}
+ --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED
+ --add-opens java.base/java.lang=ALL-UNNAMED
--illegal-access=permit
diff --git a/kernel/kernel-datamapper-orika/src/test/java/io/mosip/kernel/datamapper/orika/test/DataMapperBootApplication.java b/kernel/kernel-datamapper-orika/src/test/java/io/mosip/kernel/datamapper/orika/test/DataMapperBootApplication.java
index 33be2d700aa..d6785f0d751 100644
--- a/kernel/kernel-datamapper-orika/src/test/java/io/mosip/kernel/datamapper/orika/test/DataMapperBootApplication.java
+++ b/kernel/kernel-datamapper-orika/src/test/java/io/mosip/kernel/datamapper/orika/test/DataMapperBootApplication.java
@@ -2,13 +2,14 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
/*
* (non-Javadoc)
* Data Validator Boot Application for SpringBootTest
*/
-@SpringBootApplication
+@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
@ComponentScan(basePackages = "io.mosip.kernel.datamapper.orika.test")
public class DataMapperBootApplication {
diff --git a/kernel/kernel-datamapper-orika/src/test/resources/bootstrap.properties b/kernel/kernel-datamapper-orika/src/test/resources/bootstrap.properties
index 6b60209c30e..649e1c65df6 100644
--- a/kernel/kernel-datamapper-orika/src/test/resources/bootstrap.properties
+++ b/kernel/kernel-datamapper-orika/src/test/resources/bootstrap.properties
@@ -1,2 +1,4 @@
spring.sleuth.web.enabled=false
-spring.sleuth.http.enabled=false
\ No newline at end of file
+spring.sleuth.http.enabled=false
+
+#spring.datasource.driver-class-name=org.testcontainers.jdbc.ContainerDatabaseDriver
\ No newline at end of file
diff --git a/kernel/kernel-demographics-api/pom.xml b/kernel/kernel-demographics-api/pom.xml
index 6e19cf27f4e..a51fe4cd44c 100644
--- a/kernel/kernel-demographics-api/pom.xml
+++ b/kernel/kernel-demographics-api/pom.xml
@@ -5,7 +5,7 @@
io.mosip.kernel
kernel-demographics-api
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-demographics-api
demographics api definitions
https://github.com/mosip/commons
@@ -15,8 +15,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -119,124 +119,34 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
org.projectlombok
lombok
- ${lombok.version}
compile
com.fasterxml.jackson.core
jackson-databind
- ${jackson.databind}
diff --git a/kernel/kernel-idgenerator-machineid/pom.xml b/kernel/kernel-idgenerator-machineid/pom.xml
index c575595351d..72c211c24a9 100644
--- a/kernel/kernel-idgenerator-machineid/pom.xml
+++ b/kernel/kernel-idgenerator-machineid/pom.xml
@@ -5,224 +5,30 @@
4.0.0
io.mosip.kernel
kernel-idgenerator-machineid
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -232,12 +38,10 @@
org.postgresql
postgresql
- ${postgresql.version}
com.h2database
h2
- ${h2.version}
test
diff --git a/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/entity/MachineId.java b/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/entity/MachineId.java
index f6186ac4148..41e8e0006de 100644
--- a/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/entity/MachineId.java
+++ b/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/entity/MachineId.java
@@ -2,10 +2,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/impl/MachineIdGeneratorImpl.java b/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/impl/MachineIdGeneratorImpl.java
index 5a9f018f3e7..a1d5b747bbb 100644
--- a/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/impl/MachineIdGeneratorImpl.java
+++ b/kernel/kernel-idgenerator-machineid/src/main/java/io/mosip/kernel/idgenerator/machineid/impl/MachineIdGeneratorImpl.java
@@ -3,7 +3,7 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
-import javax.persistence.EntityExistsException;
+import jakarta.persistence.EntityExistsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
diff --git a/kernel/kernel-idgenerator-mispid/pom.xml b/kernel/kernel-idgenerator-mispid/pom.xml
index 705a5f28210..653f638b831 100644
--- a/kernel/kernel-idgenerator-mispid/pom.xml
+++ b/kernel/kernel-idgenerator-mispid/pom.xml
@@ -7,7 +7,7 @@
io.mosip.kernel
kernel-idgenerator-mispid
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-idgenerator-mispid
Mosip commons project
https://github.com/mosip/commons
@@ -15,113 +15,24 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -136,12 +47,10 @@
org.postgresql
postgresql
- ${postgresql.version}
com.h2database
h2
- ${h2.version}
test
diff --git a/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/entity/Misp.java b/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/entity/Misp.java
index b3b3254ac09..d26afbe9255 100644
--- a/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/entity/Misp.java
+++ b/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/entity/Misp.java
@@ -3,10 +3,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/impl/MispIdGeneratorImpl.java b/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/impl/MispIdGeneratorImpl.java
index db9ea881c14..82457028555 100644
--- a/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/impl/MispIdGeneratorImpl.java
+++ b/kernel/kernel-idgenerator-mispid/src/main/java/io/mosip/kernel/idgenerator/mispid/impl/MispIdGeneratorImpl.java
@@ -3,7 +3,7 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
-import javax.persistence.EntityExistsException;
+import jakarta.persistence.EntityExistsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
diff --git a/kernel/kernel-idgenerator-partnerid/pom.xml b/kernel/kernel-idgenerator-partnerid/pom.xml
index 103627ee1a5..c5aa8b7151c 100644
--- a/kernel/kernel-idgenerator-partnerid/pom.xml
+++ b/kernel/kernel-idgenerator-partnerid/pom.xml
@@ -4,7 +4,7 @@
4.0.0
io.mosip.kernel
kernel-idgenerator-partnerid
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-idgenerator-partnerid
Mosip commons project
http://maven.apache.org
@@ -12,218 +12,24 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -239,12 +45,10 @@
org.postgresql
postgresql
- ${postgresql.version}
com.h2database
h2
- ${h2.version}
test
@@ -434,4 +238,4 @@
https://github.com/mosip/commons
-
\ No newline at end of file
+
diff --git a/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/entity/Partner.java b/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/entity/Partner.java
index 4e8b0d32598..8b099d0550c 100644
--- a/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/entity/Partner.java
+++ b/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/entity/Partner.java
@@ -3,10 +3,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/impl/PartnerIdGeneratorImpl.java b/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/impl/PartnerIdGeneratorImpl.java
index cf077b67f3b..0ad08e260ae 100644
--- a/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/impl/PartnerIdGeneratorImpl.java
+++ b/kernel/kernel-idgenerator-partnerid/src/main/java/io/mosip/kernel/idgenerator/partnerid/impl/PartnerIdGeneratorImpl.java
@@ -3,7 +3,7 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
-import javax.persistence.EntityExistsException;
+import jakarta.persistence.EntityExistsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
diff --git a/kernel/kernel-idgenerator-prid/pom.xml b/kernel/kernel-idgenerator-prid/pom.xml
index 6b4ec540923..df65fd21d8e 100644
--- a/kernel/kernel-idgenerator-prid/pom.xml
+++ b/kernel/kernel-idgenerator-prid/pom.xml
@@ -10,221 +10,27 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
kernel-idgenerator-prid
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
io.mosip.kernel
@@ -239,13 +45,11 @@
com.h2database
h2
- ${h2.version}
test
org.postgresql
postgresql
- ${postgresql.version}
io.mosip.kernel
diff --git a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSeed.java b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSeed.java
index 3a2f818ef6d..c60f4bbb2e6 100644
--- a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSeed.java
+++ b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSeed.java
@@ -2,10 +2,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSequence.java b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSequence.java
index 42d7f1ba729..b9f529068a0 100644
--- a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSequence.java
+++ b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/entity/PridSequence.java
@@ -2,10 +2,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/impl/PridGeneratorImpl.java b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/impl/PridGeneratorImpl.java
index 6b6207fe0f5..0bd2ac114cf 100644
--- a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/impl/PridGeneratorImpl.java
+++ b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/impl/PridGeneratorImpl.java
@@ -4,7 +4,7 @@
import java.security.SecureRandom;
import java.util.concurrent.TimeUnit;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
diff --git a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/repository/PridSequenceRepository.java b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/repository/PridSequenceRepository.java
index 051711ee6c1..d5b0b29351b 100644
--- a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/repository/PridSequenceRepository.java
+++ b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/repository/PridSequenceRepository.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.idgenerator.prid.repository;
-import javax.persistence.LockModeType;
+import jakarta.persistence.LockModeType;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.data.jpa.repository.Query;
diff --git a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/util/PridFilterUtils.java b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/util/PridFilterUtils.java
index 1160c481db7..0a8e9b8756c 100644
--- a/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/util/PridFilterUtils.java
+++ b/kernel/kernel-idgenerator-prid/src/main/java/io/mosip/kernel/idgenerator/prid/util/PridFilterUtils.java
@@ -7,7 +7,7 @@
import java.util.regex.Pattern;
import java.util.stream.IntStream;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
diff --git a/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorBootApplication.java b/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorBootApplication.java
index 9c8dfacfaf2..6bc21781974 100644
--- a/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorBootApplication.java
+++ b/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorBootApplication.java
@@ -2,6 +2,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
/*
* (non-Javadoc)
@@ -9,6 +10,7 @@
*/
@SpringBootApplication
+@ComponentScan("io.mosip.kernel.*")
public class PridGeneratorBootApplication {
public static void main(String[] args) {
SpringApplication.run(PridGeneratorBootApplication.class, args);
diff --git a/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorTest.java b/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorTest.java
index efede30b9bc..d4456a16e75 100644
--- a/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorTest.java
+++ b/kernel/kernel-idgenerator-prid/src/test/java/io/mosip/kernel/idgenerator/prid/test/PridGeneratorTest.java
@@ -11,10 +11,8 @@
import java.util.List;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
@@ -22,17 +20,16 @@
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;
-import io.mosip.kernel.core.dataaccess.exception.DataAccessLayerException;
import io.mosip.kernel.core.idgenerator.spi.PridGenerator;
import io.mosip.kernel.core.idvalidator.spi.PridValidator;
import io.mosip.kernel.idgenerator.prid.entity.PridSeed;
import io.mosip.kernel.idgenerator.prid.entity.PridSequence;
-import io.mosip.kernel.idgenerator.prid.exception.PridException;
+import io.mosip.kernel.idgenerator.prid.impl.PridGeneratorImpl;
import io.mosip.kernel.idgenerator.prid.repository.PridSeedRepository;
import io.mosip.kernel.idgenerator.prid.repository.PridSequenceRepository;
@RunWith(SpringRunner.class)
-@SpringBootTest(classes = PridGeneratorBootApplication.class)
+@SpringBootTest(classes = {PridGeneratorBootApplication.class} )
public class PridGeneratorTest {
@Value("${mosip.kernel.prid.length}")
diff --git a/kernel/kernel-idgenerator-regcenterid/pom.xml b/kernel/kernel-idgenerator-regcenterid/pom.xml
index 225c7ff6397..3cd13f57bf6 100644
--- a/kernel/kernel-idgenerator-regcenterid/pom.xml
+++ b/kernel/kernel-idgenerator-regcenterid/pom.xml
@@ -8,222 +8,28 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
kernel-idgenerator-regcenterid
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
io.mosip.kernel
@@ -238,12 +44,10 @@
org.postgresql
postgresql
- ${postgresql.version}
com.h2database
h2
- ${h2.version}
test
diff --git a/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/entity/RegistrationCenterId.java b/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/entity/RegistrationCenterId.java
index 36806a587d6..88105b3ea6e 100644
--- a/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/entity/RegistrationCenterId.java
+++ b/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/entity/RegistrationCenterId.java
@@ -2,10 +2,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/impl/RegistrationCenterIdGeneratorImpl.java b/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/impl/RegistrationCenterIdGeneratorImpl.java
index 47e1c2f0f47..f332ccf6bf3 100644
--- a/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/impl/RegistrationCenterIdGeneratorImpl.java
+++ b/kernel/kernel-idgenerator-regcenterid/src/main/java/io/mosip/kernel/idgenerator/regcenterid/impl/RegistrationCenterIdGeneratorImpl.java
@@ -3,7 +3,7 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
-import javax.persistence.EntityExistsException;
+import jakarta.persistence.EntityExistsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
diff --git a/kernel/kernel-idgenerator-rid/pom.xml b/kernel/kernel-idgenerator-rid/pom.xml
index 56b336d6681..cc8a336e1da 100644
--- a/kernel/kernel-idgenerator-rid/pom.xml
+++ b/kernel/kernel-idgenerator-rid/pom.xml
@@ -8,117 +8,28 @@
io.mosip.kernel
kernel-idgenerator-rid
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -134,12 +45,10 @@
org.postgresql
postgresql
- ${postgresql.version}
com.h2database
h2
- ${h2.version}
test
diff --git a/kernel/kernel-idgenerator-rid/src/main/java/io/mosip/kernel/idgenerator/rid/entity/Rid.java b/kernel/kernel-idgenerator-rid/src/main/java/io/mosip/kernel/idgenerator/rid/entity/Rid.java
index 600a872679e..8a6485a0b9c 100644
--- a/kernel/kernel-idgenerator-rid/src/main/java/io/mosip/kernel/idgenerator/rid/entity/Rid.java
+++ b/kernel/kernel-idgenerator-rid/src/main/java/io/mosip/kernel/idgenerator/rid/entity/Rid.java
@@ -2,10 +2,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-idgenerator-service/Dockerfile b/kernel/kernel-idgenerator-service/Dockerfile
index 71011547133..cdf89d3c552 100644
--- a/kernel/kernel-idgenerator-service/Dockerfile
+++ b/kernel/kernel-idgenerator-service/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11
+FROM eclipse-temurin:21-jre-alpine
ARG SOURCE
ARG COMMIT_HASH
@@ -57,16 +57,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/kernel/kernel-idgenerator-service/pom.xml b/kernel/kernel-idgenerator-service/pom.xml
index a23c55e014f..d907e21a7cd 100644
--- a/kernel/kernel-idgenerator-service/pom.xml
+++ b/kernel/kernel-idgenerator-service/pom.xml
@@ -11,121 +11,32 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
1.3.2
3.4.1
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
2.3.7
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
**/constant/**,**/config/**,**/httpfilter/**,**/cache/**,**/entity/**,**/model/**,**/exception/**,**/repository/**,**/verticle/**,**/spi/**,"**/proxy/**","**/entities/**","**/filter/**","**/util/**","**/verifier/**","**/IDGeneratorVertxApplication.java"
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
kernel-idgenerator-service
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
io.mosip.kernel
@@ -135,7 +46,6 @@
org.springframework.boot
spring-boot-starter-data-jpa
- ${spring.boot.version}
io.mosip.kernel
@@ -146,28 +56,23 @@
org.springframework.boot
spring-boot-starter-validation
- ${spring.boot.version}
io.vertx
vertx-web
- ${vertx.version}
io.vertx
vertx-web-client
- ${vertx.version}
io.vertx
vertx-unit
- ${vertx.version}
test
io.vertx
vertx-config-spring-config-server
- ${vertx.version}
com.fasterxml.jackson.core
@@ -178,33 +83,27 @@
io.vertx
vertx-config
- ${vertx.version}
io.vertx
vertx-health-check
- ${vertx.version}
org.postgresql
postgresql
- ${postgresql.version}
com.h2database
h2
- ${h2.version}
runtime
com.google.guava
guava
- ${guava.version}
io.swagger.core.v3
swagger-core
- ${swagger.core.version}
com.fasterxml.jackson.core
@@ -255,7 +154,6 @@
org.springframework.boot
spring-boot-starter-actuator
- ${spring.boot.version}
com.fasterxml.jackson.core
@@ -288,7 +186,6 @@
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
true
ZIP
diff --git a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/IDGeneratorVertxApplication.java b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/IDGeneratorVertxApplication.java
index 292af017f39..33e648af42b 100644
--- a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/IDGeneratorVertxApplication.java
+++ b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/IDGeneratorVertxApplication.java
@@ -9,7 +9,7 @@
import java.util.Map;
import java.util.stream.Stream;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Value;
diff --git a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/HibernateDaoConfig.java b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/HibernateDaoConfig.java
index d9bf948adde..4526a8f0f8f 100644
--- a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/HibernateDaoConfig.java
+++ b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/HibernateDaoConfig.java
@@ -3,7 +3,6 @@
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.slf4j.Logger;
@@ -12,16 +11,22 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@@ -29,6 +34,7 @@
import com.zaxxer.hikari.HikariDataSource;
import io.mosip.kernel.vidgenerator.constant.HibernatePersistenceConstant;
+import jakarta.persistence.EntityManagerFactory;
/**
* Configuration class for IDGenerator
@@ -43,8 +49,10 @@
@PropertySource({ "classpath:bootstrap.properties" })
@PropertySource(value = "classpath:application-${spring.profiles.active}.properties", ignoreResourceNotFound = true)
@EnableJpaRepositories(basePackages = { "io.mosip.kernel.vidgenerator.repository", "io.mosip.kernel.uingenerator.repository"})
+@EnableAutoConfiguration
@ComponentScan(basePackages = { "io.mosip.kernel.vidgenerator.*","io.mosip.kernel.uingenerator.*", "io.mosip.kernel.idgenerator.vid.*",
- "io.mosip.kernel.crypto.*", "${mosip.auth.adapter.impl.basepackage}","io.mosip.kernel.cryptosignature.*","io.mosip.kernel.idgenerator.*","io.mosip.kernel.keygenerator.bouncycastle"})
+ "io.mosip.kernel.crypto.*", "${mosip.auth.adapter.impl.basepackage}.*","io.mosip.kernel.cryptosignature.*","io.mosip.kernel.idgenerator.*","io.mosip.kernel.keygenerator.bouncycastle"},
+excludeFilters = @Filter(type=FilterType.REGEX,pattern="io\\.mosip\\.kernel\\.idgenerator\\.test\\..*"))
@EnableTransactionManagement
public class HibernateDaoConfig implements EnvironmentAware {
diff --git a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceHealthCheckerhandler.java b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceHealthCheckerhandler.java
index b7fe249a896..0281f93d4af 100644
--- a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceHealthCheckerhandler.java
+++ b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceHealthCheckerhandler.java
@@ -24,6 +24,7 @@
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
+import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpMethod;
@@ -80,13 +81,13 @@ public UinServiceHealthCheckerhandler(Vertx vertx, AuthProvider provider, Object
}
@Override
- public HealthCheckHandler register(String name, Handler> procedure) {
+ public HealthCheckHandler register(String name, Handler> procedure) {
healthChecks.register(name, procedure);
return this;
}
@Override
- public HealthCheckHandler register(String name, long timeout, Handler> procedure) {
+ public HealthCheckHandler register(String name, long timeout, Handler> procedure) {
healthChecks.register(name, timeout, procedure);
return this;
}
@@ -96,7 +97,7 @@ public HealthCheckHandler register(String name, long timeout, Handler future) {
+ public void databaseHealthChecker(Promise future) {
try {
Class.forName(driver);
@@ -131,7 +132,7 @@ public void databaseHealthChecker(Future future) {
*
* @param future {@link Future} instance from handler
*/
- public void dispSpaceHealthChecker(Future future) {
+ public void dispSpaceHealthChecker(Promise future) {
final long diskFreeInBytes = this.currentWorkingDirPath.getUsableSpace();
if (diskFreeInBytes >= THRESHOLD) {
@@ -153,7 +154,7 @@ public void dispSpaceHealthChecker(Future future) {
* @param future {@link Future} instance from handler
* @param vertx {@link Vertx} instance
*/
- public void verticleHealthHandler(Future future, Vertx vertx) {
+ public void verticleHealthHandler(Promise future, Vertx vertx) {
vertx.eventBus().send(UinGeneratorConstant.UIN_GENERATOR_ADDRESS, UINHealthConstants.PING, response -> {
diff --git a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceRouter.java b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceRouter.java
index e731ee2e0d6..f724b83b6d6 100644
--- a/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceRouter.java
+++ b/kernel/kernel-idgenerator-service/src/main/java/io/mosip/kernel/idgenerator/config/UinServiceRouter.java
@@ -33,7 +33,7 @@
import io.mosip.kernel.uingenerator.exception.UinNotIssuedException;
import io.mosip.kernel.uingenerator.exception.UinStatusNotFoundException;
import io.mosip.kernel.uingenerator.service.UinService;
-import io.vertx.core.Future;
+import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.WorkerExecutor;
import io.vertx.core.http.HttpMethod;
@@ -293,7 +293,7 @@ private void setError(RoutingContext routingContext, ServiceError error, Request
}
}
- private void setError(RoutingContext routingContext, ServiceError error, Future
diff --git a/kernel/kernel-licensekeygenerator-misp/src/main/java/io/mosip/kernel/licensekeygenerator/misp/util/MISPLicenseKeyGeneratorUtil.java b/kernel/kernel-licensekeygenerator-misp/src/main/java/io/mosip/kernel/licensekeygenerator/misp/util/MISPLicenseKeyGeneratorUtil.java
index 65926f304d4..d5c16ad537a 100644
--- a/kernel/kernel-licensekeygenerator-misp/src/main/java/io/mosip/kernel/licensekeygenerator/misp/util/MISPLicenseKeyGeneratorUtil.java
+++ b/kernel/kernel-licensekeygenerator-misp/src/main/java/io/mosip/kernel/licensekeygenerator/misp/util/MISPLicenseKeyGeneratorUtil.java
@@ -3,7 +3,7 @@
import java.security.SecureRandom;
import java.util.concurrent.TimeUnit;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Value;
diff --git a/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorBootApplication.java b/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorBootApplication.java
index 1b74574807f..c6360561d78 100644
--- a/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorBootApplication.java
+++ b/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorBootApplication.java
@@ -3,9 +3,11 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
+import org.springframework.test.context.TestPropertySource;
@SpringBootApplication
//@ComponentScan({ "io.mosip.kernel.*" })
+@TestPropertySource(locations = {"classpath:application.properties", "classpath:bootstrap.properties"})
public class MISPLicenseGeneratorBootApplication {
public static void main(String[] args) {
SpringApplication.run(MISPLicenseGeneratorBootApplication.class, args);
diff --git a/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorExceptionTest.java b/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorExceptionTest.java
index 0ffbd771eb8..2cedba81715 100644
--- a/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorExceptionTest.java
+++ b/kernel/kernel-licensekeygenerator-misp/src/test/java/io/mosip/kernel/licensekeygenerator/misp/test/MISPLicenseGeneratorExceptionTest.java
@@ -33,7 +33,7 @@
@PowerMockRunnerDelegate(SpringRunner.class)
@PowerMockIgnore({"com.sun.org.apache.xerces.*",
"javax.xml.*", "org.xml.*", "org.w3c.dom.*",
- "com.sun.org.apache.xalan.*", "javax.activation.*"})
+ "com.sun.org.apache.xalan.*", "jakarta.activation.*"})
@PrepareForTest(value = RandomStringUtils.class)
public class MISPLicenseGeneratorExceptionTest {
/**
diff --git a/kernel/kernel-logger-logback/pom.xml b/kernel/kernel-logger-logback/pom.xml
index cb3a005f1e6..92caa350a62 100644
--- a/kernel/kernel-logger-logback/pom.xml
+++ b/kernel/kernel-logger-logback/pom.xml
@@ -4,13 +4,13 @@
4.0.0
io.mosip.kernel
kernel-logger-logback
- 1.2.1-SNAPSHOT
-
+ 1.2.1-java21-SNAPSHOT
+
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -21,204 +21,21 @@
3.2.0
2.3
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -229,21 +46,22 @@
net.logstash.logback
logstash-logback-encoder
- 6.4
ch.qos.logback
logback-classic
- ${logback.version}
ch.qos.logback
logback-access
- ${logback.version}
-
+
+ junit
+ junit
+ test
+
@@ -309,7 +127,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.2.0
+ ${maven.javadoc.version}
attach-javadocs
diff --git a/kernel/kernel-logger-logback/src/test/java/io/mosip/kernel/logger/logback/test/LogfactoryTest.java b/kernel/kernel-logger-logback/src/test/java/io/mosip/kernel/logger/logback/test/LogfactoryTest.java
index 51021eebf18..9cada6ea0bf 100644
--- a/kernel/kernel-logger-logback/src/test/java/io/mosip/kernel/logger/logback/test/LogfactoryTest.java
+++ b/kernel/kernel-logger-logback/src/test/java/io/mosip/kernel/logger/logback/test/LogfactoryTest.java
@@ -510,7 +510,7 @@ public void testgetDefaultFileLoggerNameWithRollingIllegalState() {
mosipRollingFileAppender.setFileName(FILENAME);
mosipRollingFileAppender.setImmediateFlush(true);
mosipRollingFileAppender.setPrudent(false);
- mosipRollingFileAppender.setFileNamePattern("src/test/resources/test/test-%d{aaaa}.txt");
+ mosipRollingFileAppender.setFileNamePattern("src/test/resources/test/test-%d{a}.txt");
mosipRollingFileAppender.setMaxHistory(5);
mosipRollingFileAppender.setTotalCap("100KB");
Logfactory.getDefaultRollingFileLogger(mosipRollingFileAppender, "LogfactoryTest");
diff --git a/kernel/kernel-notification-service/Dockerfile b/kernel/kernel-notification-service/Dockerfile
index 41c1d95a67d..d51ebf698cd 100644
--- a/kernel/kernel-notification-service/Dockerfile
+++ b/kernel/kernel-notification-service/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11
+FROM eclipse-temurin:21-jre-alpine
ARG SOURCE
ARG COMMIT_HASH
@@ -46,16 +46,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/kernel/kernel-notification-service/pom.xml b/kernel/kernel-notification-service/pom.xml
index 7858e4042d9..8673ae98b8b 100644
--- a/kernel/kernel-notification-service/pom.xml
+++ b/kernel/kernel-notification-service/pom.xml
@@ -8,226 +8,33 @@
kernel-notification-service
Mosip commons project
https://github.com/mosip/commons
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
io.mosip.kernel
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
1.5.10
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -237,17 +44,14 @@
org.springframework.boot
spring-boot-starter-security
- ${spring.boot.version}
org.springframework.boot
spring-boot-starter-web
- ${spring.boot.version}
org.springframework.security
spring-security-test
- ${spring.security.test.version}
io.mosip.kernel
@@ -257,24 +61,19 @@
org.springframework.boot
spring-boot-starter-mail
- ${spring.boot.version}
org.springdoc
springdoc-openapi-ui
- ${springdoc.version}
-
org.springframework.boot
spring-boot-configuration-processor
true
- ${spring.boot.version}
com.googlecode.json-simple
json-simple
- 1.1.1
junit
@@ -282,8 +81,12 @@
+
+ org.hibernate.validator
+ hibernate-validator
+
-
+
ossrh
@@ -296,10 +99,18 @@
+
+ maven-compiler-plugin
+ ${maven.compiler.version}
+
+ ${maven.compiler.source}
+ ${maven.compiler.target}
+ true
+
+
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
true
ZIP
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/NotificationBootApplication.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/NotificationBootApplication.java
index d3fa337e136..b0e6e7522b9 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/NotificationBootApplication.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/NotificationBootApplication.java
@@ -15,7 +15,7 @@
*
*/
@SpringBootApplication(scanBasePackages = { "io.mosip.kernel.emailnotification.*", "${mosip.auth.adapter.impl.basepackage}",
- "io.mosip.kernel.core.logger.config" })
+ "io.mosip.kernel.core.logger.config", "io.mosip.kernel.smsserviceprovider.*" })
@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class })
@EnableAsync
public class NotificationBootApplication {
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/AsyncConfiguration.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/AsyncConfiguration.java
index 521886a997c..c49c842d155 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/AsyncConfiguration.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/AsyncConfiguration.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.emailnotification.config;
-import javax.servlet.Filter;
+import jakarta.servlet.Filter;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/CommonConfig.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/CommonConfig.java
index e81c5ff1e42..88440961f8a 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/CommonConfig.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/CommonConfig.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.emailnotification.config;
-import javax.servlet.Filter;
+import jakarta.servlet.Filter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ReqResFilter.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ReqResFilter.java
index b16ceda89cf..0373ee08faf 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ReqResFilter.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ReqResFilter.java
@@ -2,14 +2,14 @@
import java.io.IOException;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.util.ContentCachingRequestWrapper;
import org.springframework.web.util.ContentCachingResponseWrapper;
@@ -26,7 +26,7 @@ public class ReqResFilter implements Filter {
/*
* (non-Javadoc)
*
- * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
+ * @see jakarta.servlet.Filter#init(jakarta.servlet.FilterConfig)
*/
@Override
public void init(FilterConfig filterConfig) throws ServletException {
@@ -36,8 +36,8 @@ public void init(FilterConfig filterConfig) throws ServletException {
/*
* (non-Javadoc)
*
- * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
- * javax.servlet.ServletResponse, javax.servlet.FilterChain)
+ * @see jakarta.servlet.Filter#doFilter(jakarta.servlet.ServletRequest,
+ * jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
@@ -62,7 +62,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
/*
* (non-Javadoc)
*
- * @see javax.servlet.Filter#destroy()
+ * @see jakarta.servlet.Filter#destroy()
*/
@Override
public void destroy() {
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ResponseBodyAdviceConfig.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ResponseBodyAdviceConfig.java
index c6d12c5cd1d..6c0c9f0013d 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ResponseBodyAdviceConfig.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/config/ResponseBodyAdviceConfig.java
@@ -1,7 +1,7 @@
package io.mosip.kernel.emailnotification.config;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequestWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/controller/SmsNotificationController.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/controller/SmsNotificationController.java
index 69bf57bddf9..506f119e1a6 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/controller/SmsNotificationController.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/controller/SmsNotificationController.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.emailnotification.controller;
-import javax.validation.Valid;
+import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/dto/SmsRequestDto.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/dto/SmsRequestDto.java
index ce50a903454..7520c99e21f 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/dto/SmsRequestDto.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/dto/SmsRequestDto.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.emailnotification.dto;
-import javax.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotBlank;
import lombok.Data;
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/exception/ApiExceptionHandler.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/exception/EmailNotificationApiExceptionHandler.java
similarity index 98%
rename from kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/exception/ApiExceptionHandler.java
rename to kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/exception/EmailNotificationApiExceptionHandler.java
index 18774f39b5e..eec6855fb56 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/exception/ApiExceptionHandler.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/exception/EmailNotificationApiExceptionHandler.java
@@ -5,7 +5,7 @@
import java.time.ZoneId;
import java.util.List;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -36,7 +36,7 @@
* @since 1.0.0
*/
@RestControllerAdvice
-public class ApiExceptionHandler {
+public class EmailNotificationApiExceptionHandler {
/**
* Autowired reference for {@link ObjectMapper}.
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/service/impl/EmailNotificationServiceImpl.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/service/impl/EmailNotificationServiceImpl.java
index c096a340877..e16acce7706 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/service/impl/EmailNotificationServiceImpl.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/service/impl/EmailNotificationServiceImpl.java
@@ -1,7 +1,7 @@
package io.mosip.kernel.emailnotification.service.impl;
-import javax.mail.MessagingException;
-import javax.mail.internet.MimeMessage;
+import jakarta.mail.MessagingException;
+import jakarta.mail.internet.MimeMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/util/EmailNotificationUtils.java b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/util/EmailNotificationUtils.java
index 497a07e4e58..91162fb925c 100644
--- a/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/util/EmailNotificationUtils.java
+++ b/kernel/kernel-notification-service/src/main/java/io/mosip/kernel/emailnotification/util/EmailNotificationUtils.java
@@ -7,10 +7,10 @@
import java.util.List;
import java.util.Set;
-import javax.mail.MessagingException;
-import javax.mail.internet.AddressException;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
+import jakarta.mail.MessagingException;
+import jakarta.mail.internet.AddressException;
+import jakarta.mail.internet.InternetAddress;
+import jakarta.mail.internet.MimeMessage;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.mail.javamail.JavaMailSender;
diff --git a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/NotificationTestBootApplication.java b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/NotificationTestBootApplication.java
index 3cb84586468..06fda8547fa 100644
--- a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/NotificationTestBootApplication.java
+++ b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/NotificationTestBootApplication.java
@@ -2,6 +2,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
* Mail notifier application
@@ -10,7 +11,8 @@
* @since 1.0.0
*
*/
-@SpringBootApplication(scanBasePackages = { "io.mosip.kernel.emailnotification.*" })
+@SpringBootApplication(scanBasePackages = { "io.mosip.kernel.emailnotification.*" },
+exclude={DataSourceAutoConfiguration.class})
public class NotificationTestBootApplication {
/**
diff --git a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestConfig.java b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestConfig.java
index 4a005d3c4c3..065695b96c9 100644
--- a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestConfig.java
+++ b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestConfig.java
@@ -7,9 +7,10 @@
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.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
+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;
@@ -25,15 +26,21 @@ public RestTemplate restTemplateConfig()
TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true;
- SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy)
+ SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom().loadTrustMaterial(acceptingTrustStrategy)
.build();
SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
- CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build();
+ var connnectionManagerBuilder = PoolingHttpClientConnectionManagerBuilder.create();
+ connnectionManagerBuilder.setSSLSocketFactory(csf);
+ var connectionManager = connnectionManagerBuilder.build();
+
+ HttpClientBuilder httpClientBuilder = HttpClients.custom()
+ .setConnectionManager(connectionManager);
+
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
- requestFactory.setHttpClient(httpClient);
+ requestFactory.setHttpClient(httpClientBuilder.build());
return new RestTemplate(requestFactory);
}
diff --git a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestSecurityConfig.java b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestSecurityConfig.java
index 3f15f753e0a..80d1c36bb82 100644
--- a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestSecurityConfig.java
+++ b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/config/TestSecurityConfig.java
@@ -4,54 +4,37 @@
import java.util.Arrays;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.springframework.security.web.AuthenticationEntryPoint;
+import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.firewall.DefaultHttpFirewall;
import org.springframework.security.web.firewall.HttpFirewall;
+import jakarta.servlet.http.HttpServletResponse;
+
@Configuration
@EnableWebSecurity
-@EnableGlobalMethodSecurity(prePostEnabled = true)
-public class TestSecurityConfig extends WebSecurityConfigurerAdapter {
+@EnableMethodSecurity
+public class TestSecurityConfig {
@Bean
public HttpFirewall defaultHttpFirewall() {
return new DefaultHttpFirewall();
}
- @Override
- public void configure(WebSecurity webSecurity) throws Exception {
- webSecurity.ignoring().antMatchers(allowedEndPoints());
- super.configure(webSecurity);
- webSecurity.httpFirewall(defaultHttpFirewall());
- }
-
- private String[] allowedEndPoints() {
- return new String[] { "/assets/**", "/icons/**", "/screenshots/**", "/favicon**", "/**/favicon**", "/css/**",
- "/js/**", "/*/error**", "/*/webjars/**", "/*/v2/api-docs", "/*/configuration/ui",
- "/*/configuration/security", "/*/swagger-resources/**", "/*/swagger-ui.html" };
- }
-
- @Override
- protected void configure(final HttpSecurity httpSecurity) throws Exception {
- httpSecurity.csrf().disable();
- httpSecurity.httpBasic().and().authorizeRequests().anyRequest().authenticated().and().sessionManagement()
- .sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling()
- .authenticationEntryPoint(unauthorizedEntryPoint());
+ @Bean
+ protected SecurityFilterChain configureSecurityFilterChain(final HttpSecurity httpSecurity) throws Exception {
+ httpSecurity.csrf(http -> http.disable());
+ return httpSecurity.build();
}
@Bean
diff --git a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/controller/MailNotifierControllerTest.java b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/controller/MailNotifierControllerTest.java
index 3310d97f38a..37e97dd1906 100644
--- a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/controller/MailNotifierControllerTest.java
+++ b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/controller/MailNotifierControllerTest.java
@@ -8,31 +8,34 @@
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.actuate.health.HealthContributor;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.multipart.MultipartFile;
import io.mosip.kernel.core.http.ResponseWrapper;
+import io.mosip.kernel.core.notification.spi.EmailNotification;
import io.mosip.kernel.core.notification.spi.SMSServiceProvider;
import io.mosip.kernel.emailnotification.controller.EmailNotificationController;
import io.mosip.kernel.emailnotification.dto.ResponseDto;
-import io.mosip.kernel.emailnotification.service.impl.EmailNotificationServiceImpl;
import io.mosip.kernel.emailnotification.test.NotificationTestBootApplication;
@RunWith(SpringRunner.class)
-@SpringBootTest(classes = NotificationTestBootApplication.class)
+//@SpringBootTest(classes = NotificationTestBootApplication.class)
public class MailNotifierControllerTest {
@Mock
- EmailNotificationServiceImpl service;
+ EmailNotification emailNotificationService;
@InjectMocks
EmailNotificationController controller;
- @MockBean
- private SMSServiceProvider sMSServiceProvider;
-
+// @MockBean
+// private SMSServiceProvider sMSServiceProvider;
+
@Test
public void testToCheckMailSendController() throws Exception {
MultipartFile file = new MockMultipartFile("test.txt", "test.txt", null, new byte[1100]);
@@ -47,7 +50,7 @@ public void testToCheckMailSendController() throws Exception {
ResponseDto dto = new ResponseDto();
dto.setMessage("");
dto.setStatus("");
- when(service.sendEmail(mailTo, mailCc, mailSubject, mailContent, arr)).thenReturn(dto);
+ when(emailNotificationService.sendEmail(mailTo, mailCc, mailSubject, mailContent, arr)).thenReturn(dto);
assertThat(controller.sendEMail(mailTo, mailCc, mailSubject, mailContent, arr), isA(ResponseWrapper.class));
}
}
\ No newline at end of file
diff --git a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/exception/ExceptionHandlerTest.java b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/exception/ExceptionHandlerTest.java
index dcce5d4a836..6e657faead3 100644
--- a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/exception/ExceptionHandlerTest.java
+++ b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/exception/ExceptionHandlerTest.java
@@ -14,6 +14,10 @@
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import io.mosip.kernel.core.http.RequestWrapper;
import io.mosip.kernel.core.notification.spi.SMSServiceProvider;
import io.mosip.kernel.emailnotification.service.impl.SmsNotificationServiceImpl;
import io.mosip.kernel.emailnotification.test.NotificationTestBootApplication;
@@ -25,6 +29,9 @@ public class ExceptionHandlerTest {
@Autowired
private MockMvc mockMvc;
+
+ @Autowired
+ private ObjectMapper mapper;
@MockBean
SmsNotificationServiceImpl service;
@@ -36,15 +43,24 @@ public class ExceptionHandlerTest {
@Test
public void emptyContactNumberTest() throws Exception {
String json = "{\"number\":\"\",\"message\":\"hello..your otp is 342891\"}";
- mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(json))
+ String requestWrapperJson = wrapRequest(json);
+ mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(requestWrapperJson))
.andExpect(status().isOk());
}
+ private String wrapRequest(String json) throws JsonProcessingException {
+ RequestWrapper requestWrapper = new RequestWrapper();
+ requestWrapper.setRequest(json);
+ String requestWrapperJson = mapper.writeValueAsString(requestWrapper);
+ return requestWrapperJson;
+ }
+
@WithUserDetails("individual")
@Test
public void nullContactNumberTest() throws Exception {
String json = "{\"number\":null,\"message\":\"hello..your otp is 342891\"}";
- mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(json))
+ String requestWrapperJson = wrapRequest(json);
+ mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(requestWrapperJson))
.andExpect(status().isOk());
}
@@ -52,7 +68,8 @@ public void nullContactNumberTest() throws Exception {
@Test
public void nullMessageTest() throws Exception {
String json = "{\"number\":\"8987672341\",\"message\":null}";
- mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(json))
+ String requestWrapperJson = wrapRequest(json);
+ mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(requestWrapperJson))
.andExpect(status().isOk());
}
@@ -60,7 +77,8 @@ public void nullMessageTest() throws Exception {
@Test
public void emptyMessageTest() throws Exception {
String json = "{\"number\":\"\",\"message\":\"\"}";
- mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(json))
+ String requestWrapperJson = wrapRequest(json);
+ mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(requestWrapperJson))
.andExpect(status().isOk());
}
@@ -68,7 +86,8 @@ public void emptyMessageTest() throws Exception {
@Test
public void contactNumberLengthTest() throws Exception {
String json = "{\"number\":\"678\",\"message\":\"\"}";
- mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(json))
+ String requestWrapperJson = wrapRequest(json);
+ mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(requestWrapperJson))
.andExpect(status().isOk());
}
@@ -76,7 +95,8 @@ public void contactNumberLengthTest() throws Exception {
@Test
public void invalidContactNumberTest() throws Exception {
String json = "{\"number\":\"sdjnjkdfj\",\"message\":\"\"}";
- mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(json))
+ String requestWrapperJson = wrapRequest(json);
+ mockMvc.perform(post("/sms/send").contentType(MediaType.APPLICATION_JSON).content(requestWrapperJson))
.andExpect(status().isOk());
}
}
diff --git a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/service/MailNotifierServiceTest.java b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/service/MailNotifierServiceTest.java
index 22999438c58..f06da22fbb2 100644
--- a/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/service/MailNotifierServiceTest.java
+++ b/kernel/kernel-notification-service/src/test/java/io/mosip/kernel/emailnotification/test/service/MailNotifierServiceTest.java
@@ -4,7 +4,7 @@
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
-import javax.mail.internet.MimeMessage;
+import jakarta.mail.internet.MimeMessage;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/kernel/kernel-pdfgenerator-itext/pom.xml b/kernel/kernel-pdfgenerator-itext/pom.xml
index 85cc5d2442c..e20f737ac74 100644
--- a/kernel/kernel-pdfgenerator-itext/pom.xml
+++ b/kernel/kernel-pdfgenerator-itext/pom.xml
@@ -4,228 +4,45 @@
4.0.0
io.mosip.kernel
kernel-pdfgenerator-itext
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-pdfgenerator
generate pdf for given template
UTF-8
- 11
- 11
- 3.8.0
-
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.2.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
7.1.0
2.0.0
5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
kernel-core
${kernel.core.version}
+
+
+ org.bouncycastle
+ bcprov-jdk18on
+
+
com.itextpdf
@@ -258,6 +75,16 @@
bcpkix-jdk15on
${bouncycastle.version}
+
+ com.itextpdf
+ kernel
+ 7.1.0
+
+
+ com.itextpdf
+ io
+ 7.1.0
+
@@ -437,4 +264,4 @@
https://github.com/mosip/commons
-
\ No newline at end of file
+
diff --git a/kernel/kernel-pinvalidator/pom.xml b/kernel/kernel-pinvalidator/pom.xml
index 42e14b0b4e3..d16b5b999a2 100644
--- a/kernel/kernel-pinvalidator/pom.xml
+++ b/kernel/kernel-pinvalidator/pom.xml
@@ -4,223 +4,28 @@
4.0.0
io.mosip.kernel
kernel-pinvalidator
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
http://maven.apache.org
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -230,7 +35,6 @@
org.springframework.cloud
spring-cloud-starter-config
- ${spring-cloud-config.version}
diff --git a/kernel/kernel-pinvalidator/src/main/java/io/mosip/kernel/pinvalidator/impl/PinValidatorImpl.java b/kernel/kernel-pinvalidator/src/main/java/io/mosip/kernel/pinvalidator/impl/PinValidatorImpl.java
index 3250b1fac76..252d2c33832 100644
--- a/kernel/kernel-pinvalidator/src/main/java/io/mosip/kernel/pinvalidator/impl/PinValidatorImpl.java
+++ b/kernel/kernel-pinvalidator/src/main/java/io/mosip/kernel/pinvalidator/impl/PinValidatorImpl.java
@@ -2,7 +2,7 @@
import java.util.regex.Pattern;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
diff --git a/kernel/kernel-pridgenerator-service/Dockerfile b/kernel/kernel-pridgenerator-service/Dockerfile
index 446bfb225ab..66aa1a84ed6 100644
--- a/kernel/kernel-pridgenerator-service/Dockerfile
+++ b/kernel/kernel-pridgenerator-service/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11
+FROM eclipse-temurin:21-jre-alpine
ARG SOURCE
ARG COMMIT_HASH
@@ -51,16 +51,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/kernel/kernel-pridgenerator-service/pom.xml b/kernel/kernel-pridgenerator-service/pom.xml
index 7d7b4a252e3..dd9d967bb08 100644
--- a/kernel/kernel-pridgenerator-service/pom.xml
+++ b/kernel/kernel-pridgenerator-service/pom.xml
@@ -8,222 +8,28 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
**/constant/**,**/config/**,**/httpfilter/**,**/cache/**,**/entity/**,**/model/**,**/exception/**,**/repository/**,**/verticle/**,**/spi/**,"**/proxy/**","**/entities/**","**/filter/**","**/util/**","**/verifier/**","**/KernelPridgeneratorServiceApplication.java"
kernel-pridgenerator-service
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -233,7 +39,6 @@
org.springframework.boot
spring-boot-starter-data-jpa
- ${spring.boot.version}
io.mosip.kernel
@@ -244,28 +49,23 @@
org.springframework.boot
spring-boot-starter-validation
- ${spring.boot.version}
io.vertx
vertx-web
- ${vertx.version}
io.vertx
vertx-web-client
- ${vertx.version}
io.vertx
vertx-unit
- ${vertx.version}
test
io.vertx
vertx-config-spring-config-server
- ${vertx.version}
com.fasterxml.jackson.core
@@ -277,33 +77,27 @@
io.vertx
vertx-config
- ${vertx.version}
io.vertx
vertx-health-check
- ${vertx.version}
org.postgresql
postgresql
- ${postgresql.version}
com.h2database
h2
- ${h2.version}
runtime
com.google.guava
guava
- ${guava.version}
io.swagger.core.v3
swagger-core
- ${swagger.core.version}
com.fasterxml.jackson.core
@@ -371,7 +165,6 @@
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
true
ZIP
diff --git a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/KernelPridgeneratorServiceApplication.java b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/KernelPridgeneratorServiceApplication.java
index 041fa1da29c..45ab945a80d 100644
--- a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/KernelPridgeneratorServiceApplication.java
+++ b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/KernelPridgeneratorServiceApplication.java
@@ -9,7 +9,7 @@
import java.util.Map;
import java.util.stream.Stream;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Value;
diff --git a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/HibernateDaoConfig.java b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/HibernateDaoConfig.java
index b4d972906e8..8360011ff1a 100644
--- a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/HibernateDaoConfig.java
+++ b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/HibernateDaoConfig.java
@@ -3,7 +3,7 @@
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
+import jakarta.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.slf4j.Logger;
diff --git a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/PridServiceHealthCheckerhandler.java b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/PridServiceHealthCheckerhandler.java
index 15b4c32b19b..081bf5ad3e4 100644
--- a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/PridServiceHealthCheckerhandler.java
+++ b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/config/PridServiceHealthCheckerhandler.java
@@ -25,6 +25,7 @@
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
+import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpHeaders;
import io.vertx.core.http.HttpMethod;
@@ -81,13 +82,13 @@ public PridServiceHealthCheckerhandler(Vertx vertx, AuthProvider provider, Objec
}
@Override
- public HealthCheckHandler register(String name, Handler> procedure) {
+ public HealthCheckHandler register(String name, Handler> procedure) {
healthChecks.register(name, procedure);
return this;
}
@Override
- public HealthCheckHandler register(String name, long timeout, Handler> procedure) {
+ public HealthCheckHandler register(String name, long timeout, Handler> procedure) {
healthChecks.register(name, timeout, procedure);
return this;
}
@@ -97,7 +98,7 @@ public HealthCheckHandler register(String name, long timeout, Handler future) {
+ public void databaseHealthChecker(Promise future) {
try {
Class.forName(driver);
@@ -132,7 +133,7 @@ public void databaseHealthChecker(Future future) {
*
* @param future {@link Future} instance from handler
*/
- public void dispSpaceHealthChecker(Future future) {
+ public void dispSpaceHealthChecker(Promise future) {
final long diskFreeInBytes = this.currentWorkingDirPath.getUsableSpace();
if (diskFreeInBytes >= THRESHOLD) {
@@ -155,7 +156,7 @@ public void dispSpaceHealthChecker(Future future) {
* @param future {@link Future} instance from handler
* @param vertx {@link Vertx} instance
*/
- public void verticleHealthHandler(Future future, Vertx vertx) {
+ public void verticleHealthHandler(Promise future, Vertx vertx) {
vertx.eventBus().send(EventType.CHECKPOOL, PRIDHealthConstants.PING, response -> {
diff --git a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/constant/HibernatePersistenceConstant.java b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/constant/HibernatePersistenceConstant.java
index 57bf97b462e..fa3fdc194ab 100644
--- a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/constant/HibernatePersistenceConstant.java
+++ b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/constant/HibernatePersistenceConstant.java
@@ -39,7 +39,7 @@ private HibernatePersistenceConstant() {
/**
* The string constant my sql dialect
*/
- public static final String POSTGRESQL_95_DIALECT = "org.hibernate.dialect.PostgreSQL95Dialect";
+ public static final String POSTGRESQL_95_DIALECT = "org.hibernate.dialect.PostgreSQLDialect";
/**
* The string constant for hibernate statistics
*/
diff --git a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/BaseEntity.java b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/BaseEntity.java
index 8d9cab45294..c5a07ad9c52 100644
--- a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/BaseEntity.java
+++ b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/BaseEntity.java
@@ -2,8 +2,8 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.MappedSuperclass;
+import jakarta.persistence.Column;
+import jakarta.persistence.MappedSuperclass;
import lombok.Data;
import lombok.NoArgsConstructor;
diff --git a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/PridEntity.java b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/PridEntity.java
index 7e83d2f0de2..d45adfb56a2 100644
--- a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/PridEntity.java
+++ b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/entity/PridEntity.java
@@ -1,9 +1,9 @@
package io.mosip.kernel.pridgenerator.entity;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
diff --git a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/router/PridFetcherRouter.java b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/router/PridFetcherRouter.java
index da72a7d4261..e41ae2c8453 100644
--- a/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/router/PridFetcherRouter.java
+++ b/kernel/kernel-pridgenerator-service/src/main/java/io/mosip/kernel/pridgenerator/router/PridFetcherRouter.java
@@ -20,7 +20,7 @@
import io.mosip.kernel.pridgenerator.dto.PridFetchResponseDto;
import io.mosip.kernel.pridgenerator.exception.PridGeneratorServiceException;
import io.mosip.kernel.pridgenerator.service.PridService;
-import io.vertx.core.Future;
+import io.vertx.core.Promise;
import io.vertx.core.Vertx;
import io.vertx.core.WorkerExecutor;
import io.vertx.core.logging.Logger;
@@ -95,7 +95,7 @@ public Router createRouter(Vertx vertx) {
return router;
}
- private void setError(RoutingContext routingContext, ServiceError error, Future blockingCodeHandler) {
+ private void setError(RoutingContext routingContext, ServiceError error, Promise blockingCodeHandler) {
ResponseWrapper errorResponse = new ResponseWrapper<>();
errorResponse.getErrors().add(error);
objectMapper.registerModule(new JavaTimeModule());
diff --git a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateDaoConfig.java b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateDaoConfig.java
index 07570663d38..e909e36caf7 100644
--- a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateDaoConfig.java
+++ b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateDaoConfig.java
@@ -3,7 +3,7 @@
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
+import jakarta.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.slf4j.Logger;
diff --git a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateExceptionDaoConfig.java b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateExceptionDaoConfig.java
index 48a0bfc53dc..a28fa6986b5 100644
--- a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateExceptionDaoConfig.java
+++ b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/config/HibernateExceptionDaoConfig.java
@@ -3,7 +3,7 @@
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
+import jakarta.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.mockito.Mockito;
diff --git a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationExceptionTest.java b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationExceptionTest.java
index 2255640055d..e8a1e9add56 100644
--- a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationExceptionTest.java
+++ b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationExceptionTest.java
@@ -6,7 +6,7 @@
* import java.io.IOException; import java.net.ServerSocket; import
* java.util.stream.Stream;
*
- * import javax.annotation.PostConstruct;
+ * import jakarta.annotation.PostConstruct;
*
* import org.junit.AfterClass; import org.junit.BeforeClass; import
* org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito;
diff --git a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationTest.java b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationTest.java
index f415da29b59..a448de7edfd 100644
--- a/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationTest.java
+++ b/kernel/kernel-pridgenerator-service/src/test/java/io/mosip/kernel/pridgenerator/test/router/IntegrationTest.java
@@ -4,7 +4,7 @@
* import java.io.IOException; import java.net.ServerSocket; import
* java.util.stream.Stream;
*
- * import javax.annotation.PostConstruct;
+ * import jakarta.annotation.PostConstruct;
*
* import org.junit.AfterClass; import org.junit.BeforeClass; import
* org.junit.Test; import org.junit.runner.RunWith; import
diff --git a/kernel/kernel-qrcodegenerator-zxing/pom.xml b/kernel/kernel-qrcodegenerator-zxing/pom.xml
index a3bec14d125..460c710acb1 100644
--- a/kernel/kernel-qrcodegenerator-zxing/pom.xml
+++ b/kernel/kernel-qrcodegenerator-zxing/pom.xml
@@ -6,7 +6,7 @@
io.mosip.kernel
kernel-qrcodegenerator-zxing
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
jar
kernel-qrcodegenerator-zxing
@@ -14,215 +14,12 @@
UTF-8
- 11
- 11
- 3.8.0
-
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
diff --git a/kernel/kernel-ridgenerator-service/Dockerfile b/kernel/kernel-ridgenerator-service/Dockerfile
index ba2ad038e0c..92133afa94a 100644
--- a/kernel/kernel-ridgenerator-service/Dockerfile
+++ b/kernel/kernel-ridgenerator-service/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11
+FROM eclipse-temurin:21-jre-alpine
ARG SOURCE
ARG COMMIT_HASH
@@ -48,16 +48,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/kernel/kernel-ridgenerator-service/pom.xml b/kernel/kernel-ridgenerator-service/pom.xml
index 0c000d36058..78e16620355 100644
--- a/kernel/kernel-ridgenerator-service/pom.xml
+++ b/kernel/kernel-ridgenerator-service/pom.xml
@@ -7,7 +7,7 @@
io.mosip.kernel
kernel-ridgenerator-service
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel-ridgenerator-service
Mosip commons project
https://github.com/mosip/commons
@@ -15,114 +15,25 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
1.5.10
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -132,12 +43,10 @@
org.springframework.boot
spring-boot-starter-security
- ${spring.boot.version}
org.springframework.security
spring-security-test
- ${spring.security.test.version}
io.mosip.kernel
@@ -147,7 +56,6 @@
org.postgresql
postgresql
- ${postgresql.version}
io.mosip.kernel
@@ -155,20 +63,18 @@
${kernel.logger.version}
- org.springdoc
- springdoc-openapi-ui
- ${springdoc.version}
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+ 2.5.0
org.springframework.boot
spring-boot-configuration-processor
true
- ${spring.boot.version}
com.googlecode.json-simple
json-simple
- 1.1.1
junit
@@ -193,7 +99,6 @@
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
true
ZIP
diff --git a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/RidGeneratorBootApplication.java b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/RidGeneratorBootApplication.java
index 198a33ff4ad..fc8560fc6bc 100644
--- a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/RidGeneratorBootApplication.java
+++ b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/RidGeneratorBootApplication.java
@@ -2,6 +2,9 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Import;
+
+import io.mosip.kernel.dataaccess.hibernate.config.HibernateDaoConfig;
/**
* Main class for RID generator.
@@ -11,6 +14,7 @@
*/
@SpringBootApplication(scanBasePackages = { "io.mosip.kernel.ridgenerator.*", "${mosip.auth.adapter.impl.basepackage}",
"io.mosip.kernel.core.logger.config"})
+@Import(value = {HibernateDaoConfig.class})
public class RidGeneratorBootApplication {
/**
diff --git a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/Config.java b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/Config.java
index 33c7bdce479..71d1fab5896 100644
--- a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/Config.java
+++ b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/Config.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.ridgenerator.config;
-import javax.servlet.Filter;
+import jakarta.servlet.Filter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
diff --git a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ReqResFilter.java b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ReqResFilter.java
index 32f00871ecf..c84c104719c 100644
--- a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ReqResFilter.java
+++ b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ReqResFilter.java
@@ -2,14 +2,14 @@
import java.io.IOException;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.util.ContentCachingRequestWrapper;
import org.springframework.web.util.ContentCachingResponseWrapper;
@@ -26,7 +26,7 @@ public class ReqResFilter implements Filter {
/*
* (non-Javadoc)
*
- * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
+ * @see jakarta.servlet.Filter#init(jakarta.servlet.FilterConfig)
*/
@Override
public void init(FilterConfig filterConfig) throws ServletException {
@@ -36,8 +36,8 @@ public void init(FilterConfig filterConfig) throws ServletException {
/*
* (non-Javadoc)
*
- * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest,
- * javax.servlet.ServletResponse, javax.servlet.FilterChain)
+ * @see jakarta.servlet.Filter#doFilter(jakarta.servlet.ServletRequest,
+ * jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
*/
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
@@ -62,7 +62,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
/*
* (non-Javadoc)
*
- * @see javax.servlet.Filter#destroy()
+ * @see jakarta.servlet.Filter#destroy()
*/
@Override
public void destroy() {
diff --git a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ResponseBodyAdviceConfig.java b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ResponseBodyAdviceConfig.java
index 094fac6b9bb..609a1000da5 100644
--- a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ResponseBodyAdviceConfig.java
+++ b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/config/ResponseBodyAdviceConfig.java
@@ -1,7 +1,7 @@
package io.mosip.kernel.ridgenerator.config;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequestWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;
diff --git a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/Rid.java b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/Rid.java
index 8e35a5144c5..be90d2483a4 100644
--- a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/Rid.java
+++ b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/Rid.java
@@ -3,13 +3,13 @@
import java.io.Serializable;
import java.time.LocalDateTime;
-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.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.Table;
import io.mosip.kernel.ridgenerator.entity.id.CenterAndMachineId;
import lombok.AllArgsConstructor;
diff --git a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/id/CenterAndMachineId.java b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/id/CenterAndMachineId.java
index 0d98f3b770a..0f165a5af43 100644
--- a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/id/CenterAndMachineId.java
+++ b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/entity/id/CenterAndMachineId.java
@@ -2,8 +2,8 @@
import java.io.Serializable;
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
+import jakarta.persistence.Column;
+import jakarta.persistence.Embeddable;
import lombok.AllArgsConstructor;
import lombok.Data;
diff --git a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/exception/ApiExceptionalHandler.java b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/exception/ApiExceptionalHandler.java
index b17797a98df..75acdff130a 100644
--- a/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/exception/ApiExceptionalHandler.java
+++ b/kernel/kernel-ridgenerator-service/src/main/java/io/mosip/kernel/ridgenerator/exception/ApiExceptionalHandler.java
@@ -2,7 +2,7 @@
import java.io.IOException;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
diff --git a/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/TestBootApplication.java b/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/TestBootApplication.java
index 1bde0543d4e..e7e911fcf68 100644
--- a/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/TestBootApplication.java
+++ b/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/TestBootApplication.java
@@ -4,6 +4,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
@@ -17,7 +18,8 @@
* @author Abhishek Kumar
* @since 1.0.0
*/
-@SpringBootApplication(scanBasePackages = "io.mosip.kernel.ridgenerator.*")
+@SpringBootApplication(scanBasePackages = "io.mosip.kernel.ridgenerator.*",
+ exclude={DataSourceAutoConfiguration.class})
@EnableAsync
@Import(TestSecurityConfig.class)
public class TestBootApplication {
diff --git a/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestConfig.java b/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestConfig.java
index 447bd96dc70..fe1a987198d 100644
--- a/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestConfig.java
+++ b/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestConfig.java
@@ -7,9 +7,10 @@
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.HttpClientBuilder;
+import org.apache.hc.client5.http.impl.classic.HttpClients;
+import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
+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;
@@ -25,15 +26,21 @@ public RestTemplate restTemplateConfig()
TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true;
- SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom().loadTrustMaterial(null, acceptingTrustStrategy)
+ SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom().loadTrustMaterial(acceptingTrustStrategy)
.build();
SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
- CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build();
+ var connnectionManagerBuilder = PoolingHttpClientConnectionManagerBuilder.create();
+ connnectionManagerBuilder.setSSLSocketFactory(csf);
+ var connectionManager = connnectionManagerBuilder.build();
+
+ HttpClientBuilder httpClientBuilder = HttpClients.custom()
+ .setConnectionManager(connectionManager);
+
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
- requestFactory.setHttpClient(httpClient);
+ requestFactory.setHttpClient(httpClientBuilder.build());
return new RestTemplate(requestFactory);
}
diff --git a/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestSecurityConfig.java b/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestSecurityConfig.java
index 6379c967e0e..1727fb46663 100644
--- a/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestSecurityConfig.java
+++ b/kernel/kernel-ridgenerator-service/src/test/java/io/mosip/kernel/ridgenerator/test/config/TestSecurityConfig.java
@@ -4,54 +4,36 @@
import java.util.Arrays;
import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.springframework.security.web.AuthenticationEntryPoint;
+import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.firewall.DefaultHttpFirewall;
import org.springframework.security.web.firewall.HttpFirewall;
+import jakarta.servlet.http.HttpServletResponse;
+
@Configuration
@EnableWebSecurity
-@EnableGlobalMethodSecurity(prePostEnabled = true)
-public class TestSecurityConfig extends WebSecurityConfigurerAdapter {
+@EnableMethodSecurity
+public class TestSecurityConfig {
@Bean
public HttpFirewall defaultHttpFirewall() {
return new DefaultHttpFirewall();
}
- @Override
- public void configure(WebSecurity webSecurity) throws Exception {
- webSecurity.ignoring().antMatchers(allowedEndPoints());
- super.configure(webSecurity);
- webSecurity.httpFirewall(defaultHttpFirewall());
- }
-
- private String[] allowedEndPoints() {
- return new String[] { "/assets/**", "/icons/**", "/screenshots/**", "/favicon**", "/**/favicon**", "/css/**",
- "/js/**", "/*/error**", "/*/webjars/**", "/*/v2/api-docs", "/*/configuration/ui",
- "/*/configuration/security", "/*/swagger-resources/**", "/*/swagger-ui.html" };
- }
-
- @Override
- protected void configure(final HttpSecurity httpSecurity) throws Exception {
- httpSecurity.csrf().disable();
- httpSecurity.httpBasic().and().authorizeRequests().anyRequest().authenticated().and().sessionManagement()
- .sessionCreationPolicy(SessionCreationPolicy.STATELESS).and().exceptionHandling()
- .authenticationEntryPoint(unauthorizedEntryPoint());
+ @Bean
+ protected SecurityFilterChain configure(final HttpSecurity httpSecurity) throws Exception {
+ return httpSecurity.build();
}
@Bean
diff --git a/kernel/kernel-salt-generator/Dockerfile b/kernel/kernel-salt-generator/Dockerfile
index 51585103bee..38f2296d5e7 100644
--- a/kernel/kernel-salt-generator/Dockerfile
+++ b/kernel/kernel-salt-generator/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:11
+FROM eclipse-temurin:21-jre-alpine
ARG SOURCE
ARG COMMIT_HASH
@@ -75,16 +75,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/kernel/kernel-salt-generator/pom.xml b/kernel/kernel-salt-generator/pom.xml
index feeb2134ee1..b80d45cff51 100644
--- a/kernel/kernel-salt-generator/pom.xml
+++ b/kernel/kernel-salt-generator/pom.xml
@@ -4,7 +4,7 @@
4.0.0
io.mosip.kernel
kernel-salt-generator
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
Kernel Salt Generator
Batch Job Application to for one-time populating of salt values for MOSIP related application salt tables.
https://github.com/mosip/commons
@@ -12,8 +12,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
@@ -24,229 +24,38 @@
3.2.0
2.3
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 1.2.1-SNAPSHOT
- 2.0.2.RELEASE
- 2.0.0.RELEASE
- 42.2.2
- 0.8.5
+ 1.2.1-java21-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
2.12.0
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
org.springframework.boot
spring-boot-starter-batch
- ${spring.boot.version}
org.springframework.boot
spring-boot-starter-data-jpa
- ${spring.boot.version}
org.springframework.boot
spring-boot-starter-web
- ${spring.boot.version}
org.springframework.cloud
spring-cloud-starter-config
- ${spring-cloud-config.version}
io.mosip.kernel
@@ -261,27 +70,31 @@
org.postgresql
postgresql
- ${postgresql.version}
com.fasterxml.jackson.core
jackson-databind
- ${com.fasterxml.jackson.core.version}
com.fasterxml.jackson.core
jackson-annotations
- ${com.fasterxml.jackson.core.version}
com.fasterxml.jackson.core
jackson-core
- ${com.fasterxml.jackson.core.version}
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
- ${com.fasterxml.jackson.core.version}
+
+
+ org.projectlombok
+ lombok
+ compile
+
+
+ org.hibernate.validator
+ hibernate-validator
@@ -300,7 +113,6 @@
org.springframework.boot
spring-boot-maven-plugin
- ${spring.boot.version}
true
diff --git a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/SaltGeneratorBootApplication.java b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/SaltGeneratorBootApplication.java
index cc3150f9d42..60adeb6b4d7 100644
--- a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/SaltGeneratorBootApplication.java
+++ b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/SaltGeneratorBootApplication.java
@@ -1,6 +1,5 @@
package io.mosip.kernel.saltgenerator;
-import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.scheduling.ScheduledTasksEndpointAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -15,7 +14,6 @@
* @author Manoj SP
*/
@SpringBootApplication
-@EnableBatchProcessing
@EnableAutoConfiguration(exclude = { JmxAutoConfiguration.class, ScheduledTasksEndpointAutoConfiguration.class })
public class SaltGeneratorBootApplication {
diff --git a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorConfig.java b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorConfig.java
index 4276720c560..f1ada3fd643 100644
--- a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorConfig.java
+++ b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorConfig.java
@@ -5,28 +5,30 @@
import static io.mosip.kernel.saltgenerator.constant.SaltGeneratorConstant.DATASOURCE_PASSWORD;
import static io.mosip.kernel.saltgenerator.constant.SaltGeneratorConstant.DATASOURCE_URL;
import static io.mosip.kernel.saltgenerator.constant.SaltGeneratorConstant.DATASOURCE_USERNAME;
+import static io.mosip.kernel.saltgenerator.constant.SaltGeneratorConstant.DB_SCHEMA_NAME;
import static io.mosip.kernel.saltgenerator.constant.SaltGeneratorConstant.PACKAGE_TO_SCAN;
import java.util.HashMap;
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
-import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
-import org.springframework.batch.core.configuration.annotation.DefaultBatchConfigurer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.env.Environment;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
+import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
+import jakarta.persistence.EntityManagerFactory;
+
/**
* The Class SaltGeneratorConfig - Provides configuration for Salt
* generator application.
@@ -45,32 +47,6 @@ public class SaltGeneratorConfig {
@Autowired
private PhysicalNamingStrategyResolver namingResolver;
- /**
- * Batch config
- *
- * @return the batch configurer
- */
- @Bean
- public BatchConfigurer batchConfig() {
- return new DefaultBatchConfigurer(null) {
-
- /**
- * By default, Spring batch will try to create/update records
- * in the provided datasource related to Job completion, schedule etc.
- * This override will stop spring batch to create/update any tables in provided
- * Datasource and instead use Map based implementation internally.
- *
- */
- @Override
- public void setDataSource(DataSource dataSource) {
- // By default, Spring batch will try to create/update records in the provided
- // datasource related to Job completion, schedule etc.
- // This override will stop spring batch to create/update any tables in provided
- // Datasource and instead use Map based implementation internally.
- }
- };
- }
-
/**
* Entity manager factory.
*
@@ -100,6 +76,7 @@ public DataSource dataSource() {
dataSource.setUrl(env.getProperty(String.format(DATASOURCE_URL.getValue(), alias)));
dataSource.setUsername(env.getProperty(String.format(DATASOURCE_USERNAME.getValue(), alias)));
dataSource.setPassword(env.getProperty(String.format(DATASOURCE_PASSWORD.getValue(), alias)));
+ dataSource.setSchema(env.getProperty(DB_SCHEMA_NAME.getValue()));
dataSource.setDriverClassName(env.getProperty(String.format(DATASOURCE_DRIVERCLASSNAME.getValue(), alias)));
return dataSource;
}
@@ -125,8 +102,13 @@ private Map additionalProperties() {
Map jpaProperties = new HashMap<>();
jpaProperties.put("hibernate.implicit_naming_strategy", SpringImplicitNamingStrategy.class.getName());
jpaProperties.put("hibernate.physical_naming_strategy", namingResolver);
- jpaProperties.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQL92Dialect");
+ jpaProperties.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect");
return jpaProperties;
}
+ @Bean
+ public PlatformTransactionManager transactionManager() {
+ return new DataSourceTransactionManager(dataSource());
+ }
+
}
diff --git a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorJobConfig.java b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorJobConfig.java
index a263e1cb8c7..4bed1f9b398 100644
--- a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorJobConfig.java
+++ b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/config/SaltGeneratorJobConfig.java
@@ -5,9 +5,10 @@
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.batch.core.Step;
-import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
-import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
+import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.launch.support.RunIdIncrementer;
+import org.springframework.batch.core.repository.JobRepository;
+import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +16,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.env.Environment;
+import org.springframework.transaction.PlatformTransactionManager;
import io.mosip.kernel.saltgenerator.entity.SaltEntity;
@@ -30,13 +32,6 @@ public class SaltGeneratorJobConfig {
@Autowired
private Environment env;
- /** The job builder factory. */
- @Autowired
- private JobBuilderFactory jobBuilderFactory;
-
- /** The step builder factory. */
- @Autowired
- private StepBuilderFactory stepBuilderFactory;
/** The listener. */
@Autowired
@@ -57,9 +52,8 @@ public class SaltGeneratorJobConfig {
* @return the job
*/
@Bean
- public Job job(Step step) {
- return jobBuilderFactory
- .get("job")
+ public Job job(JobRepository jobRepository,Step step) {
+ return new JobBuilder("job", jobRepository)
.incrementer(new RunIdIncrementer())
.listener(listener)
.flow(step)
@@ -74,10 +68,10 @@ public Job job(Step step) {
* @return the step
*/
@Bean
- public Step step() {
- return stepBuilderFactory
- .get("step")
- . chunk(env.getProperty(CHUNK_SIZE.getValue(), Integer.class))
+ public Step step(JobRepository jobRepository, PlatformTransactionManager transactionManager) {
+ return new StepBuilder("step", jobRepository)
+ .chunk(env.getProperty(CHUNK_SIZE.getValue(), Integer.class),
+ transactionManager)
.reader(reader)
.writer(writer)
.build();
diff --git a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/entity/SaltEntity.java b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/entity/SaltEntity.java
index 94a966b063b..6ec569f3926 100644
--- a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/entity/SaltEntity.java
+++ b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/entity/SaltEntity.java
@@ -2,10 +2,10 @@
import java.time.LocalDateTime;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
import lombok.Data;
diff --git a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/listener/BatchJobListener.java b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/listener/BatchJobListener.java
index 3fa94ea7ae1..b786a6adf71 100644
--- a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/listener/BatchJobListener.java
+++ b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/listener/BatchJobListener.java
@@ -3,7 +3,7 @@
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.JobExecution;
-import org.springframework.batch.core.listener.JobExecutionListenerSupport;
+import org.springframework.batch.core.JobExecutionListener;
import org.springframework.stereotype.Component;
import io.mosip.kernel.core.logger.spi.Logger;
@@ -23,7 +23,7 @@
* @author Manoj SP
*/
@Component
-public class BatchJobListener extends JobExecutionListenerSupport {
+public class BatchJobListener implements JobExecutionListener {
/** The mosip logger. */
Logger mosipLogger = SaltGeneratorLogger.getLogger(BatchJobListener.class);
@@ -31,7 +31,6 @@ public class BatchJobListener extends JobExecutionListenerSupport {
/* (non-Javadoc)
* @see org.springframework.batch.core.listener.JobExecutionListenerSupport#beforeJob(org.springframework.batch.core.JobExecution)
*/
- @Override
public void beforeJob(JobExecution jobExecution) {
mosipLogger.debug("SALT_GENERATOR", "BatchJobListener", "BATCH JOB STARTED WITH STATUS : ",
jobExecution.getStatus().name());
@@ -40,7 +39,6 @@ public void beforeJob(JobExecution jobExecution) {
/* (non-Javadoc)
* @see org.springframework.batch.core.listener.JobExecutionListenerSupport#afterJob(org.springframework.batch.core.JobExecution)
*/
- @Override
public void afterJob(JobExecution jobExecution) {
mosipLogger.debug("SALT_GENERATOR", "BatchJobListener", "BATCH JOB COMPLETED WITH STATUS : ",
jobExecution.getStatus().name());
diff --git a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltReader.java b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltReader.java
index dd55620eac5..1fe9b91ee27 100644
--- a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltReader.java
+++ b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltReader.java
@@ -3,7 +3,7 @@
import static io.mosip.kernel.saltgenerator.constant.SaltGeneratorConstant.END_SEQ;
import static io.mosip.kernel.saltgenerator.constant.SaltGeneratorConstant.START_SEQ;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.springframework.batch.item.ItemReader;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltWriter.java b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltWriter.java
index de4bd646ea8..9a2c6b73bee 100644
--- a/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltWriter.java
+++ b/kernel/kernel-salt-generator/src/main/java/io/mosip/kernel/saltgenerator/step/SaltWriter.java
@@ -1,17 +1,16 @@
package io.mosip.kernel.saltgenerator.step;
-import java.util.List;
import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
import javax.transaction.Transactional;
+import org.springframework.batch.item.Chunk;
import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import io.mosip.kernel.core.logger.spi.Logger;
-import io.mosip.kernel.core.saltgenerator.constant.SaltGeneratorErrorConstants;
-import io.mosip.kernel.core.saltgenerator.exception.SaltGeneratorException;
import io.mosip.kernel.saltgenerator.entity.SaltEntity;
import io.mosip.kernel.saltgenerator.logger.SaltGeneratorLogger;
import io.mosip.kernel.saltgenerator.repository.SaltRepository;
@@ -35,8 +34,8 @@ public class SaltWriter implements ItemWriter {
*/
@Override
@Transactional
- public void write(List extends SaltEntity> entities) throws Exception {
- if (repo.countByIdIn(entities.parallelStream().map(SaltEntity::getId).collect(Collectors.toList())) == 0l) {
+ public void write(Chunk extends SaltEntity> entities) throws Exception {
+ if (repo.countByIdIn(StreamSupport.stream(entities.spliterator(), true).map(SaltEntity::getId).collect(Collectors.toList())) == 0l) {
repo.saveAll(entities);
mosipLogger.debug("SALT_GENERATOR", "SaltWriter", "Entities written", String.valueOf(entities.size()));
} else {
@@ -44,4 +43,5 @@ public void write(List extends SaltEntity> entities) throws Exception {
}
}
+
}
diff --git a/kernel/kernel-salt-generator/src/main/resources/application-local.properties b/kernel/kernel-salt-generator/src/main/resources/application-local.properties
new file mode 100644
index 00000000000..134f77481a4
--- /dev/null
+++ b/kernel/kernel-salt-generator/src/main/resources/application-local.properties
@@ -0,0 +1,17 @@
+mosip.kernel.salt-generator.db.key-alias=mosip
+spring.datasource.driver-class-name=org.postgresql.Driver
+mosip.url=jdbc:postgresql://localhost:5432/postgres
+mosip.username=postgres
+mosip.password=postgres
+mosip.driverClassName=org.postgresql.Driver
+mosip.kernel.salt-generator.schemaName=mosip
+mosip.kernel.salt-generator.tableName=uin_hash_salt
+mosip.kernel.salt-generator.chunk-size=10
+mosip.kernel.salt-generator.start-sequence=0
+mosip.kernel.salt-generator.end-sequence=999
+spring.jpa.generate-ddl=true
+spring.jpa.hibernate.ddl-auto=create
+spring.hibernate.hbm2ddl.auto=create
+hibernate.hbm2ddl.auto=create
+hibernate.show_sql=true
+spring.batch.jdbc.initialize-schema=always
\ No newline at end of file
diff --git a/kernel/kernel-salt-generator/src/main/resources/bootstrap.properties b/kernel/kernel-salt-generator/src/main/resources/bootstrap.properties
index c882f95d247..fc04b627a40 100644
--- a/kernel/kernel-salt-generator/src/main/resources/bootstrap.properties
+++ b/kernel/kernel-salt-generator/src/main/resources/bootstrap.properties
@@ -2,7 +2,7 @@ spring.cloud.config.uri=localhost
spring.cloud.config.label=master
spring.cloud.config.name=kernel
spring.application.name=kernel
-spring.profiles.active=dev
+spring.profiles.active=local
#management.security.enabled=false
#management.endpoint.health.show-details=when-authorized
diff --git a/kernel/kernel-salt-generator/src/test/java/io/mosip/kernel/saltgenerator/step/test/SaltWriterTest.java b/kernel/kernel-salt-generator/src/test/java/io/mosip/kernel/saltgenerator/step/test/SaltWriterTest.java
index c1dd16f7e76..ad5d2e3cb5c 100644
--- a/kernel/kernel-salt-generator/src/test/java/io/mosip/kernel/saltgenerator/step/test/SaltWriterTest.java
+++ b/kernel/kernel-salt-generator/src/test/java/io/mosip/kernel/saltgenerator/step/test/SaltWriterTest.java
@@ -3,14 +3,13 @@
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
-import java.util.Collections;
-
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
+import org.springframework.batch.item.Chunk;
import io.mosip.kernel.core.saltgenerator.constant.SaltGeneratorErrorConstants;
import io.mosip.kernel.core.saltgenerator.exception.SaltGeneratorException;
@@ -32,7 +31,7 @@ public void testWriter() throws Exception {
SaltEntity entity = new SaltEntity();
entity.setId(0l);
when(repo.countByIdIn(Mockito.any())).thenReturn(0l);
- writer.write(Collections.singletonList(entity));
+ writer.write(Chunk.of(entity));
}
@Test
@@ -41,7 +40,7 @@ public void testWriterRecordExists() throws Exception {
SaltEntity entity = new SaltEntity();
entity.setId(0l);
when(repo.countByIdIn(Mockito.any())).thenReturn(1l);
- writer.write(Collections.singletonList(entity));
+ writer.write(Chunk.of(entity));
} catch (SaltGeneratorException e) {
assertEquals(SaltGeneratorErrorConstants.RECORD_EXISTS.getErrorCode(), e.getErrorCode());
assertEquals(SaltGeneratorErrorConstants.RECORD_EXISTS.getErrorMessage(), e.getErrorText());
diff --git a/kernel/kernel-templatemanager-velocity/pom.xml b/kernel/kernel-templatemanager-velocity/pom.xml
index d1afa4b4df2..35d1467e24f 100644
--- a/kernel/kernel-templatemanager-velocity/pom.xml
+++ b/kernel/kernel-templatemanager-velocity/pom.xml
@@ -4,223 +4,31 @@
4.0.0
io.mosip.kernel
kernel-templatemanager-velocity
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
Mosip Template Manager Using Velocity Template Engine
UTF-8
- 11
- 11
- 3.8.0
-
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
- 4.0.1
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
1.7
2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -240,7 +48,6 @@
javax.servlet
javax.servlet-api
- ${javax.servlet-api.version}
diff --git a/kernel/kernel-transliteration-icu4j/pom.xml b/kernel/kernel-transliteration-icu4j/pom.xml
index e56ea3c2372..eabf6642e4e 100644
--- a/kernel/kernel-transliteration-icu4j/pom.xml
+++ b/kernel/kernel-transliteration-icu4j/pom.xml
@@ -7,7 +7,7 @@
io.mosip.kernel
kernel-transliteration-icu4j
jar
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
kernel transliteration icu4j
https://github.com/mosip/commons
kernel-transliteration-icu4j
@@ -16,121 +16,31 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
73.2
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
org.springframework.boot
spring-boot-starter-web
- ${spring.boot.version}
org.springframework.boot
spring-boot-starter-test
- ${spring.boot.version}
test
diff --git a/kernel/kernel-transliteration-icu4j/src/test/java/io/mosip/kernel/transliteration/icu4j/test/TransliterationBootApplication.java b/kernel/kernel-transliteration-icu4j/src/test/java/io/mosip/kernel/transliteration/icu4j/test/TransliterationBootApplication.java
index 6868c2b1353..64ea6ba9df2 100644
--- a/kernel/kernel-transliteration-icu4j/src/test/java/io/mosip/kernel/transliteration/icu4j/test/TransliterationBootApplication.java
+++ b/kernel/kernel-transliteration-icu4j/src/test/java/io/mosip/kernel/transliteration/icu4j/test/TransliterationBootApplication.java
@@ -2,9 +2,10 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
-@SpringBootApplication
+@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
@ComponentScan(basePackages = "io.mosip.kernel.*")
public class TransliterationBootApplication {
public static void main(String[] args) {
diff --git a/kernel/kernel-websubclient-api/pom.xml b/kernel/kernel-websubclient-api/pom.xml
index 95adad9d34c..99e57d1e94d 100644
--- a/kernel/kernel-websubclient-api/pom.xml
+++ b/kernel/kernel-websubclient-api/pom.xml
@@ -4,7 +4,7 @@
4.0.0
io.mosip.kernel
kernel-websubclient-api
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
jar
kernel-websubclient-api
Mosip commons project
@@ -13,217 +13,23 @@
UTF-8
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- UTF-8
-
-
- 11
- 11
- 3.8.0
-
-
- 3.0.2
- 3.1.0
-
-
- 3.2.0
- 2.3
-
-
- 2.0.2.RELEASE
- 2.0.7.RELEASE
- 5.0.5.RELEASE
- 2.0.4.RELEASE
-
-
- 2.0.7
- 1.5.21
- 2.9.2
-
-
- 3.6.2
- 3.7.0
-
-
-
- 1.2
- 3.0.0
- 1.3
- 2.2
- 2.0.1.Final
- 2.2.6
-
-
- 1.4.197
- 5.1.46
- 42.2.2
- 2.5.0
- 5.2.17.Final
- 6.0.12.Final
-
-
- 4.12
- 2.23.4
- 1.7.4
- 2.0.7
-
-
- 1.2.3
- 1.7.19
- 1.7.7
- 1.7.25
-
-
- 2.9.5
- 2.9.8
- 2.9.6
- 20180130
- 2.2.10
- 20180813
- 1.1.1
-
-
- 3.6.1
- 3.7
- 2.6
- 1.11
- 4.3
- 1.9.2
- 2.2
- 4.5.6
- 19.0
- 1.18.8
- 0.1.54
- 1.4.0
- 7.1.0
- 2.0.0
- 5.5.13
- 2.3.23
- 1.7
- 2.0
- 1.5.2
- 2.1.1
- 1.66
- 63.1
- 1.0.0
- 3.3.3
- 3.1.0
- 4.1.0-incubating
- 1.11.368
- 0.2.4
- 2.3.0
- 3.0.1
- 1.9.12
- 0.6.0
- 2.0.0.AM2
- 1.8.12
- 1.4.2
- 1.4.2
- 1.2.1-SNAPSHOT
- 0.8.5
+ 21
+ 21
+ 1.2.1-java21-SNAPSHOT
+ 0.8.11
1.2.3
+
+
+
+ io.mosip.kernel
+ kernel-bom
+ 1.2.1-java21-SNAPSHOT
+ pom
+ import
+
+
+
io.mosip.kernel
@@ -233,12 +39,10 @@
org.springframework.boot
spring-boot-starter-web
- ${spring.boot.version}
org.springframework
spring-aspects
- 5.0.6.RELEASE
org.owasp.encoder
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/aspects/WebSubClientAspect.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/aspects/WebSubClientAspect.java
index f775c1ad6ca..28725da7abf 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/aspects/WebSubClientAspect.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/aspects/WebSubClientAspect.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.websub.api.aspects;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java
index 503b85b4c00..ad31f614f9f 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/IntentVerificationConfig.java
@@ -40,6 +40,10 @@ public void setEmbeddedValueResolver(StringValueResolver resolver) {
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
mappings = new HashMap<>();
for (String beanName : applicationContext.getBeanDefinitionNames()) {
+ //Skip processing this intentVerificationConfig bean.
+ if(beanName.equals("intentVerificationConfig")) {
+ continue;
+ }
if (!((ConfigurableApplicationContext) applicationContext).getBeanFactory().getBeanDefinition(beanName)
.isLazyInit()) {
Object obj = applicationContext.getBean(beanName);
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/WebSubClientConfig.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/WebSubClientConfig.java
index 191e4a49bb9..21fa04ba32f 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/WebSubClientConfig.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/config/WebSubClientConfig.java
@@ -1,6 +1,6 @@
package io.mosip.kernel.websub.api.config;
-import javax.servlet.Filter;
+import jakarta.servlet.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java
index 71811b10c0f..471ffa0e166 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/IntentVerificationFilter.java
@@ -4,10 +4,10 @@
import java.util.Map;
import java.util.Set;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
import org.owasp.encoder.Encode;
import org.slf4j.Logger;
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/MultipleReadRequestBodyFilter.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/MultipleReadRequestBodyFilter.java
index 2b3594b33e1..4e97e5eaf53 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/MultipleReadRequestBodyFilter.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/filter/MultipleReadRequestBodyFilter.java
@@ -2,11 +2,11 @@
import java.io.IOException;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.filter.GenericFilterBean;
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java
index 232ccd1046d..5fa770e7d63 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadHttpRequest.java
@@ -6,9 +6,9 @@
import java.io.InputStream;
import java.io.InputStreamReader;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
+import jakarta.servlet.ServletInputStream;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequestWrapper;
import org.springframework.util.StreamUtils;
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadServletInputStream.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadServletInputStream.java
index be56915d959..50865f490b4 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadServletInputStream.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/model/MultipleReadServletInputStream.java
@@ -4,9 +4,9 @@
import java.io.IOException;
import java.io.InputStream;
-import javax.servlet.ReadListener;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletRequest;
+import jakarta.servlet.ReadListener;
+import jakarta.servlet.ServletInputStream;
+import jakarta.servlet.ServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/verifier/AuthenticatedContentVerifier.java b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/verifier/AuthenticatedContentVerifier.java
index 8a02b55040a..70476c4a94e 100644
--- a/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/verifier/AuthenticatedContentVerifier.java
+++ b/kernel/kernel-websubclient-api/src/main/java/io/mosip/kernel/websub/api/verifier/AuthenticatedContentVerifier.java
@@ -3,7 +3,7 @@
import java.io.IOException;
import java.util.stream.Collectors;
-import javax.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletRequest;
import javax.xml.bind.DatatypeConverter;
import org.bouncycastle.crypto.digests.SHA1Digest;
diff --git a/kernel/kernel-websubclient-api/src/test/java/io/mosip/kernel/websub/api/test/WebClientApiTestBootApplication.java b/kernel/kernel-websubclient-api/src/test/java/io/mosip/kernel/websub/api/test/WebClientApiTestBootApplication.java
index 6e965e32984..eba3dacef03 100644
--- a/kernel/kernel-websubclient-api/src/test/java/io/mosip/kernel/websub/api/test/WebClientApiTestBootApplication.java
+++ b/kernel/kernel-websubclient-api/src/test/java/io/mosip/kernel/websub/api/test/WebClientApiTestBootApplication.java
@@ -2,6 +2,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
* Audit manager application
@@ -10,7 +11,8 @@
* @since 1.0.0
*
*/
-@SpringBootApplication(scanBasePackages = { "io.mosip.kernel.websub.api.*" })
+@SpringBootApplication(scanBasePackages = { "io.mosip.kernel.websub.api.*" },
+exclude={DataSourceAutoConfiguration.class})
public class WebClientApiTestBootApplication {
/**
diff --git a/kernel/pom.xml b/kernel/pom.xml
index 60c7552bf62..2800dcda4b6 100644
--- a/kernel/pom.xml
+++ b/kernel/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 1.2.1-SNAPSHOT
+ 1.2.1-java21-SNAPSHOT
io.mosip.kernel
kernel-parent
pom
@@ -13,8 +13,8 @@
UTF-8
- 11
- 11
+ 21
+ 21
3.8.0
2.22.0
3.0.2
@@ -31,7 +31,8 @@
- kernel-core
+ kernel-bom
+ kernel-core
kernel-logger-logback
kernel-dataaccess-hibernate
kernel-idgenerator-prid
@@ -67,6 +68,7 @@
kernel-pridgenerator-service
kernel-salt-generator
kernel-demographics-api
+ kernel-config-server