From cf73e4bfe2e369ae77fbbba2a83d7cf1b6e08574 Mon Sep 17 00:00:00 2001 From: nashtech-huyphamphu Date: Tue, 17 Sep 2024 11:16:49 +0700 Subject: [PATCH] #882 Create a shared project --- cart/src/main/java/com/yas/cart/config/SwaggerConfig.java | 2 +- .../java/com/yas/commonlibrary/constants/MessageCode.java | 1 + .../com/yas/commonlibrary/constants/PageableConstant.java | 1 + .../main/java/com/yas/customer/service/CustomerService.java | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cart/src/main/java/com/yas/cart/config/SwaggerConfig.java b/cart/src/main/java/com/yas/cart/config/SwaggerConfig.java index 6ee7cf309e..bc99e48080 100644 --- a/cart/src/main/java/com/yas/cart/config/SwaggerConfig.java +++ b/cart/src/main/java/com/yas/cart/config/SwaggerConfig.java @@ -17,6 +17,6 @@ flows = @OAuthFlows(authorizationCode = @OAuthFlow( authorizationUrl = "${springdoc.oauthflow.authorization-url}", tokenUrl = "${springdoc.oauthflow.token-url}", scopes = { - @OAuthScope(name = "openid", description = "openid")}))) + @OAuthScope(name = "openid", description = "openid")}))) public class SwaggerConfig { } diff --git a/common-library/src/main/java/com/yas/commonlibrary/constants/MessageCode.java b/common-library/src/main/java/com/yas/commonlibrary/constants/MessageCode.java index 8c47df9cc1..7b126e0ed1 100644 --- a/common-library/src/main/java/com/yas/commonlibrary/constants/MessageCode.java +++ b/common-library/src/main/java/com/yas/commonlibrary/constants/MessageCode.java @@ -4,6 +4,7 @@ public final class MessageCode { public static final String WAREHOUSE_NOT_FOUND = "WAREHOUSE_NOT_FOUND"; public static final String PRODUCT_NOT_FOUND = "PRODUCT_NOT_FOUND"; public static final String NAME_ALREADY_EXITED = "NAME_ALREADY_EXITED"; + private MessageCode() { //Add constructor } diff --git a/common-library/src/main/java/com/yas/commonlibrary/constants/PageableConstant.java b/common-library/src/main/java/com/yas/commonlibrary/constants/PageableConstant.java index eb20421900..24fb7afd50 100644 --- a/common-library/src/main/java/com/yas/commonlibrary/constants/PageableConstant.java +++ b/common-library/src/main/java/com/yas/commonlibrary/constants/PageableConstant.java @@ -3,6 +3,7 @@ public final class PageableConstant { public static final String DEFAULT_PAGE_SIZE = "10"; public static final String DEFAULT_PAGE_NUMBER = "0"; + private PageableConstant() { //Add constructor } diff --git a/customer/src/main/java/com/yas/customer/service/CustomerService.java b/customer/src/main/java/com/yas/customer/service/CustomerService.java index 8be72ec55c..31acec2378 100644 --- a/customer/src/main/java/com/yas/customer/service/CustomerService.java +++ b/customer/src/main/java/com/yas/customer/service/CustomerService.java @@ -1,9 +1,9 @@ package com.yas.customer.service; -import com.yas.commonlibrary.exception.NotFoundException; -import com.yas.customer.config.KeycloakPropsConfig; import com.yas.commonlibrary.exception.AccessDeniedException; +import com.yas.commonlibrary.exception.NotFoundException; import com.yas.commonlibrary.exception.WrongEmailFormatException; +import com.yas.customer.config.KeycloakPropsConfig; import com.yas.customer.utils.Constants; import com.yas.customer.viewmodel.customer.CustomerAdminVm; import com.yas.customer.viewmodel.customer.CustomerListVm;