diff --git a/pre-registration/pre-registration-application-service/src/main/resources/application.properties b/pre-registration/pre-registration-application-service/src/main/resources/application.properties index 98b834d779..07319c2281 100644 --- a/pre-registration/pre-registration-application-service/src/main/resources/application.properties +++ b/pre-registration/pre-registration-application-service/src/main/resources/application.properties @@ -426,4 +426,4 @@ auth.server.admin.allowed.audience=mosip-regproc-client,mosip-prereg-client,mosi mosip.security.authentication.provider.beans.list.pre-registration-application-service=customJWTAuthProvider mosip.security.authentication.provider.beans.list.pre-registration-booking-service=customJWTAuthProvider -mosip.preregistration.user.admin:admin \ No newline at end of file +mosip.preregistration.anonymous-profile-username:admin \ No newline at end of file diff --git a/pre-registration/pre-registration-core/src/main/java/io/mosip/analytics/event/anonymous/service/AnonymousProfileService.java b/pre-registration/pre-registration-core/src/main/java/io/mosip/analytics/event/anonymous/service/AnonymousProfileService.java index 0fb4d0449e..5211856203 100644 --- a/pre-registration/pre-registration-core/src/main/java/io/mosip/analytics/event/anonymous/service/AnonymousProfileService.java +++ b/pre-registration/pre-registration-core/src/main/java/io/mosip/analytics/event/anonymous/service/AnonymousProfileService.java @@ -31,8 +31,8 @@ public class AnonymousProfileService implements AnonymousProfileServiceIntf { @Value("${mosip.utc-datetime-pattern}") private String utcDateTimePattern; - @Value("${mosip.preregistration.user.admin}") - private String userName; + @Value("${mosip.preregistration.anonymous-profile-username}") + private String anonymousProfileUsername; /** * Autowired reference for {@link #AnonymousProfileRepostiory} @@ -70,9 +70,9 @@ public AnonymousProfileResponseDTO saveAnonymousProfile(AnonymousProfileRequestD AnonymousProfileEntity requestEntity = new AnonymousProfileEntity(); requestEntity.setId(UUIDGeneratorUtil.generateId()); requestEntity.setProfile(requestDto.getProfileDetails()); - requestEntity.setCreatedBy(userName); + requestEntity.setCreatedBy(anonymousProfileUsername); requestEntity.setCreateDateTime(currentDateTime); - requestEntity.setUpdatedBy(userName); + requestEntity.setUpdatedBy(anonymousProfileUsername); requestEntity.setUpdateDateTime(currentDateTime); requestEntity.setIsDeleted(false); diff --git a/pre-registration/pre-registration-core/src/test/java/io/mosip/analytics/event/anonymous/service/test/AnonymousProfileServiceTest.java b/pre-registration/pre-registration-core/src/test/java/io/mosip/analytics/event/anonymous/service/test/AnonymousProfileServiceTest.java index 123402a874..efce6323c6 100644 --- a/pre-registration/pre-registration-core/src/test/java/io/mosip/analytics/event/anonymous/service/test/AnonymousProfileServiceTest.java +++ b/pre-registration/pre-registration-core/src/test/java/io/mosip/analytics/event/anonymous/service/test/AnonymousProfileServiceTest.java @@ -42,8 +42,8 @@ public class AnonymousProfileServiceTest { @Value("${mosip.utc-datetime-pattern}") private String utcDateTimePattern; - @Value("${mosip.preregistration.user.admin}") - private String userName; + @Value("${mosip.preregistration.anonymous-profile-username}") + private String anonymousProfileUsername; AnonymousProfileResponseDTO responseDto = new AnonymousProfileResponseDTO(); @@ -73,9 +73,9 @@ public void saveAnonymousProfileTest() { requestEntity.setId(id); requestEntity.setProfile(requestDto.getProfileDetails()); - requestEntity.setCreatedBy(userName); + requestEntity.setCreatedBy(anonymousProfileUsername); requestEntity.setCreateDateTime(currentDateTime); - requestEntity.setUpdatedBy(userName); + requestEntity.setUpdatedBy(anonymousProfileUsername); requestEntity.setUpdateDateTime(currentDateTime); requestEntity.setIsDeleted(false); requestDto.setProfileDetails(profile); @@ -98,9 +98,9 @@ public void saveAnonymousProfileExceptionTest() throws Exception { requestEntity.setId(id); requestEntity.setProfile(requestDto.getProfileDetails()); - requestEntity.setCreatedBy(userName); + requestEntity.setCreatedBy(anonymousProfileUsername); requestEntity.setCreateDateTime(currentDateTime); - requestEntity.setUpdatedBy(userName); + requestEntity.setUpdatedBy(anonymousProfileUsername); requestEntity.setUpdateDateTime(currentDateTime); requestEntity.setIsDeleted(false); requestDto.setProfileDetails(profile); diff --git a/pre-registration/pre-registration-core/src/test/resources/application.properties b/pre-registration/pre-registration-core/src/test/resources/application.properties index 77e1ad9546..749d06e43f 100644 --- a/pre-registration/pre-registration-core/src/test/resources/application.properties +++ b/pre-registration/pre-registration-core/src/test/resources/application.properties @@ -83,4 +83,4 @@ spring.cloud.config.label=develop spring.cloud.config.name=pre-registration spring.profiles.active=mz -mosip.preregistration.user.admin:admin +mosip.preregistration.anonymous-profile-username:admin