diff --git a/src/main/java/team_alcoholic/jumo_server/JumoServerApplication.java b/src/main/java/team_alcoholic/jumo_server/JumoServerApplication.java index 58a3429..8c64227 100644 --- a/src/main/java/team_alcoholic/jumo_server/JumoServerApplication.java +++ b/src/main/java/team_alcoholic/jumo_server/JumoServerApplication.java @@ -8,7 +8,7 @@ @OpenAPIDefinition(servers = { - @Server(url = "/api/v1", description = "Default Server URL") + @Server(url = "/api", description = "Default Server URL") }) @EnableJpaAuditing @SpringBootApplication diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/domain/NewUser.java b/src/main/java/team_alcoholic/jumo_server/domain/user/domain/NewUser.java deleted file mode 100644 index f172d31..0000000 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/domain/NewUser.java +++ /dev/null @@ -1,40 +0,0 @@ -package team_alcoholic.jumo_server.domain.user.domain; - -import jakarta.persistence.*; -import lombok.Getter; -import team_alcoholic.jumo_server.domain.user.dto.UserUpdateReq; -import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; - -import java.util.UUID; - - -/** - * 사용자 정보를 담는 엔티티 - */ -@Entity(name = "user_new") -@Getter -public class NewUser extends BaseTimeEntity { - - @Id - @GeneratedValue(strategy= GenerationType.IDENTITY) - private Long id; - - private String provider; - private String providerId; - private String name; - private String nickname; - private String profileThumbnailImage; - private UUID userUuid = UUID.randomUUID(); - - /** - * 사용자 정보 수정 시 UserUpdateReq dto로부터 User 엔티티를 수정하는 메서드 - * @param dto - */ - public void updateFromDto(UserUpdateReq dto) { - if (dto.getProfileNickname() != null) this.nickname = dto.getProfileNickname(); - if (dto.getProfileThumbnailImage() != null) this.profileThumbnailImage = dto.getProfileThumbnailImage(); - - // UserImage 처리는 추후 구현 예정 - // if (dto.getProfileImage() != null) this.profileImage = dto.getProfileImage(); - } -} \ No newline at end of file diff --git a/src/main/java/team_alcoholic/jumo_server/global/config/SecurityConfig.java b/src/main/java/team_alcoholic/jumo_server/global/config/SecurityConfig.java index 87668b0..b4dcdc3 100644 --- a/src/main/java/team_alcoholic/jumo_server/global/config/SecurityConfig.java +++ b/src/main/java/team_alcoholic/jumo_server/global/config/SecurityConfig.java @@ -2,7 +2,6 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; -import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; @@ -10,7 +9,7 @@ import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.access.channel.ChannelProcessingFilter; -import team_alcoholic.jumo_server.domain.auth.service.OAuth2UserService; +import team_alcoholic.jumo_server.v1.auth.service.OAuth2UserService; import team_alcoholic.jumo_server.global.config.oauth2.CustomOAuth2SuccessHandler; import team_alcoholic.jumo_server.global.config.oauth2.GetRedirectUrlFilter; @@ -24,9 +23,6 @@ public class SecurityConfig { private final CustomAuthenticationEntryPoint customAuthenticationEntryPoint; private final CustomOAuth2SuccessHandler customOAuth2SuccessHandler; - @Value("${service.url}") - private String serviceUrl; - @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @@ -36,13 +32,17 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .httpBasic(AbstractHttpConfigurer::disable) .addFilterBefore(new GetRedirectUrlFilter(), ChannelProcessingFilter.class) // 필터 체인의 맨 앞에 필터 추가 .oauth2Login(oauth2 -> oauth2 + .authorizationEndpoint(authorization -> authorization + .baseUri("/v1/oauth2/authorization")) + .redirectionEndpoint(redirection -> redirection + .baseUri("/v1/login/oauth2/code/*")) .userInfoEndpoint(userInfoEndpoint -> userInfoEndpoint.userService(oAuth2UserService)) .successHandler(customOAuth2SuccessHandler)) .exceptionHandling(exceptionHandling -> exceptionHandling .authenticationEntryPoint(customAuthenticationEntryPoint) ) .logout(logout -> logout - .logoutUrl("/logout") + .logoutUrl("/v1/logout") .invalidateHttpSession(true) .deleteCookies("SESSION") .logoutSuccessHandler((request, response, authentication) -> { @@ -51,6 +51,4 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { ); return http.build(); } - - } \ No newline at end of file diff --git a/src/main/java/team_alcoholic/jumo_server/global/config/oauth2/CustomOAuth2SuccessHandler.java b/src/main/java/team_alcoholic/jumo_server/global/config/oauth2/CustomOAuth2SuccessHandler.java index 9c803ae..fe8adfb 100644 --- a/src/main/java/team_alcoholic/jumo_server/global/config/oauth2/CustomOAuth2SuccessHandler.java +++ b/src/main/java/team_alcoholic/jumo_server/global/config/oauth2/CustomOAuth2SuccessHandler.java @@ -8,7 +8,7 @@ import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; import org.springframework.stereotype.Component; -import team_alcoholic.jumo_server.domain.auth.dto.CustomOAuth2User; +import team_alcoholic.jumo_server.v1.auth.dto.CustomOAuth2User; import java.io.IOException; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/auth/dto/CustomOAuth2User.java b/src/main/java/team_alcoholic/jumo_server/v1/auth/dto/CustomOAuth2User.java similarity index 95% rename from src/main/java/team_alcoholic/jumo_server/domain/auth/dto/CustomOAuth2User.java rename to src/main/java/team_alcoholic/jumo_server/v1/auth/dto/CustomOAuth2User.java index 113dd78..c77834d 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/auth/dto/CustomOAuth2User.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/auth/dto/CustomOAuth2User.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.auth.dto; +package team_alcoholic.jumo_server.v1.auth.dto; import lombok.RequiredArgsConstructor; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.oauth2.core.user.OAuth2User; -import team_alcoholic.jumo_server.domain.user.dto.UserOAuth2DTO; +import team_alcoholic.jumo_server.v1.user.dto.UserOAuth2DTO; import java.io.Serial; import java.io.Serializable; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/auth/dto/KakaoResponse.java b/src/main/java/team_alcoholic/jumo_server/v1/auth/dto/KakaoResponse.java similarity index 97% rename from src/main/java/team_alcoholic/jumo_server/domain/auth/dto/KakaoResponse.java rename to src/main/java/team_alcoholic/jumo_server/v1/auth/dto/KakaoResponse.java index 434dec8..3b4ff55 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/auth/dto/KakaoResponse.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/auth/dto/KakaoResponse.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.auth.dto; +package team_alcoholic.jumo_server.v1.auth.dto; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/auth/dto/OAuth2Response.java b/src/main/java/team_alcoholic/jumo_server/v1/auth/dto/OAuth2Response.java similarity index 84% rename from src/main/java/team_alcoholic/jumo_server/domain/auth/dto/OAuth2Response.java rename to src/main/java/team_alcoholic/jumo_server/v1/auth/dto/OAuth2Response.java index efc81f0..6eed8ba 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/auth/dto/OAuth2Response.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/auth/dto/OAuth2Response.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.auth.dto; +package team_alcoholic.jumo_server.v1.auth.dto; /** * OAuth2 인증을 통해 받은 사용자 정보를 담는 DTO 인터페이스 diff --git a/src/main/java/team_alcoholic/jumo_server/domain/auth/service/OAuth2UserService.java b/src/main/java/team_alcoholic/jumo_server/v1/auth/service/OAuth2UserService.java similarity index 86% rename from src/main/java/team_alcoholic/jumo_server/domain/auth/service/OAuth2UserService.java rename to src/main/java/team_alcoholic/jumo_server/v1/auth/service/OAuth2UserService.java index 42e2a37..eae26a8 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/auth/service/OAuth2UserService.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/auth/service/OAuth2UserService.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.auth.service; +package team_alcoholic.jumo_server.v1.auth.service; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -7,11 +7,11 @@ import org.springframework.security.oauth2.core.OAuth2AuthenticationException; import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.stereotype.Service; -import team_alcoholic.jumo_server.domain.auth.dto.KakaoResponse; -import team_alcoholic.jumo_server.domain.auth.dto.OAuth2Response; -import team_alcoholic.jumo_server.domain.auth.dto.CustomOAuth2User; -import team_alcoholic.jumo_server.domain.user.dto.UserOAuth2DTO; -import team_alcoholic.jumo_server.domain.user.service.UserService; +import team_alcoholic.jumo_server.v1.auth.dto.KakaoResponse; +import team_alcoholic.jumo_server.v1.auth.dto.OAuth2Response; +import team_alcoholic.jumo_server.v1.auth.dto.CustomOAuth2User; +import team_alcoholic.jumo_server.v1.user.dto.UserOAuth2DTO; +import team_alcoholic.jumo_server.v1.user.service.UserService; /** * OAuth2 서버에서 사용자 정보를 가져와 이를 사용하여 사용자 정보를 조회하거나 생성하고 세션에 등록하는 서비스 diff --git a/src/main/java/team_alcoholic/jumo_server/domain/health/HealthCheckController.java b/src/main/java/team_alcoholic/jumo_server/v1/health/HealthCheckController.java similarity index 64% rename from src/main/java/team_alcoholic/jumo_server/domain/health/HealthCheckController.java rename to src/main/java/team_alcoholic/jumo_server/v1/health/HealthCheckController.java index 3bb7e28..01a7baa 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/health/HealthCheckController.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/health/HealthCheckController.java @@ -1,13 +1,15 @@ -package team_alcoholic.jumo_server.domain.health; +package team_alcoholic.jumo_server.v1.health; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.http.ResponseEntity; -@RestController +@RestController() +@RequestMapping("v1/health") public class HealthCheckController { - @GetMapping("/health") + @GetMapping public ResponseEntity healthCheck() { return ResponseEntity.ok("OK"); } diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/controller/LiquorController.java b/src/main/java/team_alcoholic/jumo_server/v1/liquor/controller/LiquorController.java similarity index 77% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/controller/LiquorController.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquor/controller/LiquorController.java index 16dc689..5c334dd 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/controller/LiquorController.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquor/controller/LiquorController.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.liquor.controller; +package team_alcoholic.jumo_server.v1.liquor.controller; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; @@ -7,17 +7,17 @@ import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.web.bind.annotation.*; -import team_alcoholic.jumo_server.domain.liquor.dto.LiquorPostDto; -import team_alcoholic.jumo_server.domain.liquor.dto.LiquorResDto; -import team_alcoholic.jumo_server.domain.liquor.service.LiquorService; -import team_alcoholic.jumo_server.domain.user.domain.User; -import team_alcoholic.jumo_server.domain.user.service.UserService; +import team_alcoholic.jumo_server.v1.liquor.dto.LiquorPostDto; +import team_alcoholic.jumo_server.v1.liquor.dto.LiquorResDto; +import team_alcoholic.jumo_server.v1.liquor.service.LiquorService; +import team_alcoholic.jumo_server.v1.user.domain.User; +import team_alcoholic.jumo_server.v1.user.service.UserService; import team_alcoholic.jumo_server.global.error.exception.UnauthorizedException; import java.util.Objects; @RestController -@RequestMapping("liquors") +@RequestMapping("v1/liquors") @RequiredArgsConstructor public class LiquorController { diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/Liquor.java b/src/main/java/team_alcoholic/jumo_server/v1/liquor/domain/Liquor.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/Liquor.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquor/domain/Liquor.java index e8aa429..ae6adca 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/Liquor.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquor/domain/Liquor.java @@ -1,13 +1,13 @@ -package team_alcoholic.jumo_server.domain.liquor.domain; +package team_alcoholic.jumo_server.v1.liquor.domain; import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import team_alcoholic.jumo_server.domain.tastingnote.domain.AiTastingNote; -import team_alcoholic.jumo_server.domain.tastingnote.domain.TastingNote; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.tastingnote.domain.AiTastingNote; +import team_alcoholic.jumo_server.v1.tastingnote.domain.TastingNote; +import team_alcoholic.jumo_server.v1.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseEntity; import java.util.List; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/dto/LiquorPostDto.java b/src/main/java/team_alcoholic/jumo_server/v1/liquor/dto/LiquorPostDto.java similarity index 95% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/dto/LiquorPostDto.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquor/dto/LiquorPostDto.java index ddb2e30..f4474be 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/dto/LiquorPostDto.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquor/dto/LiquorPostDto.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.liquor.dto; +package team_alcoholic.jumo_server.v1.liquor.dto; import jakarta.validation.constraints.Max; import jakarta.validation.constraints.Min; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/dto/LiquorResDto.java b/src/main/java/team_alcoholic/jumo_server/v1/liquor/dto/LiquorResDto.java similarity index 88% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/dto/LiquorResDto.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquor/dto/LiquorResDto.java index 5d77cdf..1012d5a 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/dto/LiquorResDto.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquor/dto/LiquorResDto.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.liquor.dto; +package team_alcoholic.jumo_server.v1.liquor.dto; import lombok.Builder; -import team_alcoholic.jumo_server.domain.liquor.domain.Liquor; -import team_alcoholic.jumo_server.domain.tastingnote.dto.AiNotesResDTO; -import team_alcoholic.jumo_server.domain.user.dto.UserRes; +import team_alcoholic.jumo_server.v1.liquor.domain.Liquor; +import team_alcoholic.jumo_server.v1.tastingnote.dto.AiNotesResDTO; +import team_alcoholic.jumo_server.v1.user.dto.UserRes; public record LiquorResDto( Long id, diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/exception/LiquorNotFoundException.java b/src/main/java/team_alcoholic/jumo_server/v1/liquor/exception/LiquorNotFoundException.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/exception/LiquorNotFoundException.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquor/exception/LiquorNotFoundException.java index c6e0895..2283729 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/exception/LiquorNotFoundException.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquor/exception/LiquorNotFoundException.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.liquor.exception; +package team_alcoholic.jumo_server.v1.liquor.exception; import team_alcoholic.jumo_server.global.error.exception.NotFoundException; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/repository/LiquorRepository.java b/src/main/java/team_alcoholic/jumo_server/v1/liquor/repository/LiquorRepository.java similarity index 52% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/repository/LiquorRepository.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquor/repository/LiquorRepository.java index a45f58c..4715b10 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/repository/LiquorRepository.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquor/repository/LiquorRepository.java @@ -1,8 +1,8 @@ -package team_alcoholic.jumo_server.domain.liquor.repository; +package team_alcoholic.jumo_server.v1.liquor.repository; import org.springframework.data.jpa.repository.JpaRepository; -import team_alcoholic.jumo_server.domain.liquor.domain.Liquor; +import team_alcoholic.jumo_server.v1.liquor.domain.Liquor; public interface LiquorRepository extends JpaRepository { diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/service/LiquorService.java b/src/main/java/team_alcoholic/jumo_server/v1/liquor/service/LiquorService.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/service/LiquorService.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquor/service/LiquorService.java index be17641..19344b3 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/service/LiquorService.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquor/service/LiquorService.java @@ -1,13 +1,13 @@ -package team_alcoholic.jumo_server.domain.liquor.service; +package team_alcoholic.jumo_server.v1.liquor.service; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; -import team_alcoholic.jumo_server.domain.liquor.domain.Liquor; -import team_alcoholic.jumo_server.domain.liquor.dto.LiquorPostDto; -import team_alcoholic.jumo_server.domain.liquor.dto.LiquorResDto; -import team_alcoholic.jumo_server.domain.liquor.exception.LiquorNotFoundException; -import team_alcoholic.jumo_server.domain.liquor.repository.LiquorRepository; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.liquor.domain.Liquor; +import team_alcoholic.jumo_server.v1.liquor.dto.LiquorPostDto; +import team_alcoholic.jumo_server.v1.liquor.dto.LiquorResDto; +import team_alcoholic.jumo_server.v1.liquor.exception.LiquorNotFoundException; +import team_alcoholic.jumo_server.v1.liquor.repository.LiquorRepository; +import team_alcoholic.jumo_server.v1.user.domain.User; import java.util.List; import java.util.Random; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/controller/LiquorSearchController.java b/src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/controller/LiquorSearchController.java similarity index 70% rename from src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/controller/LiquorSearchController.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/controller/LiquorSearchController.java index aa0f1f3..5eb8653 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/controller/LiquorSearchController.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/controller/LiquorSearchController.java @@ -1,17 +1,17 @@ -package team_alcoholic.jumo_server.domain.liquorsearch.controller; +package team_alcoholic.jumo_server.v1.liquorsearch.controller; import lombok.RequiredArgsConstructor; 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 team_alcoholic.jumo_server.domain.liquorsearch.domain.LiquorES; -import team_alcoholic.jumo_server.domain.liquorsearch.service.LiquorSearchService; +import team_alcoholic.jumo_server.v1.liquorsearch.domain.LiquorES; +import team_alcoholic.jumo_server.v1.liquorsearch.service.LiquorSearchService; import java.util.List; @RestController -@RequestMapping("liquorsearch") +@RequestMapping("v1/liquorsearch") @RequiredArgsConstructor public class LiquorSearchController { diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/domain/LiquorES.java b/src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/domain/LiquorES.java similarity index 93% rename from src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/domain/LiquorES.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/domain/LiquorES.java index f62b63b..5d93fbf 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/domain/LiquorES.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/domain/LiquorES.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.liquorsearch.domain; +package team_alcoholic.jumo_server.v1.liquorsearch.domain; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/service/LiquorSearchService.java b/src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/service/LiquorSearchService.java similarity index 89% rename from src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/service/LiquorSearchService.java rename to src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/service/LiquorSearchService.java index 6d7bd11..5cf5f8d 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquorsearch/service/LiquorSearchService.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/liquorsearch/service/LiquorSearchService.java @@ -1,13 +1,12 @@ -package team_alcoholic.jumo_server.domain.liquorsearch.service; +package team_alcoholic.jumo_server.v1.liquorsearch.service; import lombok.extern.slf4j.Slf4j; import org.opensearch.client.opensearch.OpenSearchClient; -import org.opensearch.client.opensearch._types.FieldValue; import org.opensearch.client.opensearch.core.SearchRequest; import org.opensearch.client.opensearch.core.SearchResponse; import org.opensearch.client.opensearch.core.search.Hit; import org.springframework.stereotype.Service; -import team_alcoholic.jumo_server.domain.liquorsearch.domain.LiquorES; +import team_alcoholic.jumo_server.v1.liquorsearch.domain.LiquorES; import java.io.IOException; import java.util.ArrayList; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/controller/MeetingApi.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/controller/MeetingApi.java similarity index 86% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/controller/MeetingApi.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/controller/MeetingApi.java index d6326b7..5e85ef7 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/controller/MeetingApi.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/controller/MeetingApi.java @@ -1,12 +1,12 @@ -package team_alcoholic.jumo_server.domain.meeting.controller; +package team_alcoholic.jumo_server.v1.meeting.controller; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; -import team_alcoholic.jumo_server.domain.meeting.dto.MeetingResDto; -import team_alcoholic.jumo_server.domain.meeting.dto.MeetingListResDto; +import team_alcoholic.jumo_server.v1.meeting.dto.MeetingResDto; +import team_alcoholic.jumo_server.v1.meeting.dto.MeetingListResDto; import java.time.LocalDateTime; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/controller/MeetingController.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/controller/MeetingController.java similarity index 80% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/controller/MeetingController.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/controller/MeetingController.java index 09f818c..4496462 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/controller/MeetingController.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/controller/MeetingController.java @@ -1,17 +1,17 @@ -package team_alcoholic.jumo_server.domain.meeting.controller; +package team_alcoholic.jumo_server.v1.meeting.controller; import lombok.RequiredArgsConstructor; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.*; -import team_alcoholic.jumo_server.domain.meeting.dto.MeetingResDto; -import team_alcoholic.jumo_server.domain.meeting.dto.MeetingListResDto; -import team_alcoholic.jumo_server.domain.meeting.service.MeetingService; +import team_alcoholic.jumo_server.v1.meeting.dto.MeetingResDto; +import team_alcoholic.jumo_server.v1.meeting.dto.MeetingListResDto; +import team_alcoholic.jumo_server.v1.meeting.service.MeetingService; import java.time.LocalDateTime; import java.util.List; @RestController -@RequestMapping("meetings") +@RequestMapping("v1/meetings") @RequiredArgsConstructor public class MeetingController implements MeetingApi { diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/domain/Meeting.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/domain/Meeting.java similarity index 90% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/domain/Meeting.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/domain/Meeting.java index 2a622d9..1914ffa 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/domain/Meeting.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/domain/Meeting.java @@ -1,8 +1,8 @@ -package team_alcoholic.jumo_server.domain.meeting.domain; +package team_alcoholic.jumo_server.v1.meeting.domain; import jakarta.persistence.*; import lombok.Getter; -import team_alcoholic.jumo_server.domain.region.domain.Region; +import team_alcoholic.jumo_server.v1.region.domain.Region; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; import java.time.LocalDateTime; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/domain/MeetingImage.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/domain/MeetingImage.java similarity index 87% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/domain/MeetingImage.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/domain/MeetingImage.java index 8508912..08b6b69 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/domain/MeetingImage.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/domain/MeetingImage.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.meeting.domain; +package team_alcoholic.jumo_server.v1.meeting.domain; import jakarta.persistence.*; import lombok.Getter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingListDto.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingListDto.java similarity index 93% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingListDto.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingListDto.java index 206891c..48df93c 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingListDto.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingListDto.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.meeting.dto; +package team_alcoholic.jumo_server.v1.meeting.dto; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; -import team_alcoholic.jumo_server.domain.meeting.domain.Meeting; +import team_alcoholic.jumo_server.v1.meeting.domain.Meeting; import java.time.LocalDateTime; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingListResDto.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingListResDto.java similarity index 85% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingListResDto.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingListResDto.java index 68ec84a..ccea3a2 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingListResDto.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingListResDto.java @@ -1,6 +1,5 @@ -package team_alcoholic.jumo_server.domain.meeting.dto; +package team_alcoholic.jumo_server.v1.meeting.dto; -import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; import java.time.LocalDateTime; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingResDto.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingResDto.java similarity index 91% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingResDto.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingResDto.java index 7af5af4..06639ce 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/dto/MeetingResDto.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/dto/MeetingResDto.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.meeting.dto; +package team_alcoholic.jumo_server.v1.meeting.dto; import lombok.Getter; import lombok.Setter; -import team_alcoholic.jumo_server.domain.meeting.domain.Meeting; -import team_alcoholic.jumo_server.domain.meeting.domain.MeetingImage; +import team_alcoholic.jumo_server.v1.meeting.domain.Meeting; +import team_alcoholic.jumo_server.v1.meeting.domain.MeetingImage; import java.time.LocalDateTime; import java.util.List; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/exception/MeetingNotFoundException.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/exception/MeetingNotFoundException.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/exception/MeetingNotFoundException.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/exception/MeetingNotFoundException.java index 29a765e..94e2982 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/exception/MeetingNotFoundException.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/exception/MeetingNotFoundException.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.meeting.exception; +package team_alcoholic.jumo_server.v1.meeting.exception; import team_alcoholic.jumo_server.global.error.exception.NotFoundException; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/repository/MeetingRepository.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/repository/MeetingRepository.java similarity index 95% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/repository/MeetingRepository.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/repository/MeetingRepository.java index a9f545b..c357ff9 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/repository/MeetingRepository.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/repository/MeetingRepository.java @@ -1,11 +1,11 @@ -package team_alcoholic.jumo_server.domain.meeting.repository; +package team_alcoholic.jumo_server.v1.meeting.repository; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import team_alcoholic.jumo_server.domain.meeting.domain.Meeting; +import team_alcoholic.jumo_server.v1.meeting.domain.Meeting; import java.time.LocalDateTime; import java.util.List; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/meeting/service/MeetingService.java b/src/main/java/team_alcoholic/jumo_server/v1/meeting/service/MeetingService.java similarity index 89% rename from src/main/java/team_alcoholic/jumo_server/domain/meeting/service/MeetingService.java rename to src/main/java/team_alcoholic/jumo_server/v1/meeting/service/MeetingService.java index 54e058b..97cf266 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/meeting/service/MeetingService.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/meeting/service/MeetingService.java @@ -1,16 +1,16 @@ -package team_alcoholic.jumo_server.domain.meeting.service; +package team_alcoholic.jumo_server.v1.meeting.service; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import team_alcoholic.jumo_server.domain.meeting.domain.Meeting; -import team_alcoholic.jumo_server.domain.meeting.dto.MeetingResDto; -import team_alcoholic.jumo_server.domain.meeting.dto.MeetingListDto; -import team_alcoholic.jumo_server.domain.meeting.exception.MeetingNotFoundException; -import team_alcoholic.jumo_server.domain.meeting.repository.MeetingRepository; -import team_alcoholic.jumo_server.domain.meeting.dto.MeetingListResDto; +import team_alcoholic.jumo_server.v1.meeting.domain.Meeting; +import team_alcoholic.jumo_server.v1.meeting.dto.MeetingResDto; +import team_alcoholic.jumo_server.v1.meeting.dto.MeetingListDto; +import team_alcoholic.jumo_server.v1.meeting.exception.MeetingNotFoundException; +import team_alcoholic.jumo_server.v1.meeting.repository.MeetingRepository; +import team_alcoholic.jumo_server.v1.meeting.dto.MeetingListResDto; import java.time.LocalDateTime; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/region/controller/RegionController.java b/src/main/java/team_alcoholic/jumo_server/v1/region/controller/RegionController.java similarity index 80% rename from src/main/java/team_alcoholic/jumo_server/domain/region/controller/RegionController.java rename to src/main/java/team_alcoholic/jumo_server/v1/region/controller/RegionController.java index 5409c9b..a5a64b3 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/region/controller/RegionController.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/region/controller/RegionController.java @@ -1,17 +1,17 @@ -package team_alcoholic.jumo_server.domain.region.controller; +package team_alcoholic.jumo_server.v1.region.controller; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import team_alcoholic.jumo_server.domain.region.domain.Region; -import team_alcoholic.jumo_server.domain.region.service.RegionService; +import team_alcoholic.jumo_server.v1.region.domain.Region; +import team_alcoholic.jumo_server.v1.region.service.RegionService; import java.util.List; @RestController -@RequestMapping("regions") +@RequestMapping("v1/regions") @RequiredArgsConstructor public class RegionController { diff --git a/src/main/java/team_alcoholic/jumo_server/domain/region/domain/Region.java b/src/main/java/team_alcoholic/jumo_server/v1/region/domain/Region.java similarity index 88% rename from src/main/java/team_alcoholic/jumo_server/domain/region/domain/Region.java rename to src/main/java/team_alcoholic/jumo_server/v1/region/domain/Region.java index 8c2397b..a3f48d1 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/region/domain/Region.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/region/domain/Region.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.region.domain; +package team_alcoholic.jumo_server.v1.region.domain; import jakarta.persistence.*; import lombok.AllArgsConstructor; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/region/repository/RegionRepository.java b/src/main/java/team_alcoholic/jumo_server/v1/region/repository/RegionRepository.java similarity index 87% rename from src/main/java/team_alcoholic/jumo_server/domain/region/repository/RegionRepository.java rename to src/main/java/team_alcoholic/jumo_server/v1/region/repository/RegionRepository.java index b8733e0..053b5c1 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/region/repository/RegionRepository.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/region/repository/RegionRepository.java @@ -1,8 +1,8 @@ -package team_alcoholic.jumo_server.domain.region.repository; +package team_alcoholic.jumo_server.v1.region.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; -import team_alcoholic.jumo_server.domain.region.domain.Region; +import team_alcoholic.jumo_server.v1.region.domain.Region; import java.util.List; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/region/service/RegionService.java b/src/main/java/team_alcoholic/jumo_server/v1/region/service/RegionService.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/region/service/RegionService.java rename to src/main/java/team_alcoholic/jumo_server/v1/region/service/RegionService.java index 60b1c0a..1c89043 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/region/service/RegionService.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/region/service/RegionService.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.region.service; +package team_alcoholic.jumo_server.v1.region.service; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; -import team_alcoholic.jumo_server.domain.region.domain.Region; -import team_alcoholic.jumo_server.domain.region.repository.RegionRepository; +import team_alcoholic.jumo_server.v1.region.domain.Region; +import team_alcoholic.jumo_server.v1.region.repository.RegionRepository; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/controller/TastingNoteController.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/controller/TastingNoteController.java similarity index 88% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/controller/TastingNoteController.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/controller/TastingNoteController.java index ee76d11..2cda537 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/controller/TastingNoteController.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/controller/TastingNoteController.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.tastingnote.controller; +package team_alcoholic.jumo_server.v1.tastingnote.controller; import jakarta.servlet.http.HttpServletRequest; import jakarta.validation.Valid; @@ -6,45 +6,41 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.core.annotation.AuthenticationPrincipal; -import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.web.bind.annotation.*; -import team_alcoholic.jumo_server.domain.tastingnote.dto.*; -import team_alcoholic.jumo_server.domain.tastingnote.service.TastingNoteService; -import team_alcoholic.jumo_server.domain.user.domain.User; -import team_alcoholic.jumo_server.domain.user.service.UserService; +import team_alcoholic.jumo_server.v1.tastingnote.dto.*; +import team_alcoholic.jumo_server.v1.tastingnote.service.TastingNoteService; +import team_alcoholic.jumo_server.v1.user.domain.User; +import team_alcoholic.jumo_server.v1.user.service.UserService; import team_alcoholic.jumo_server.global.error.exception.UnauthorizedException; import java.nio.file.AccessDeniedException; import java.util.List; import java.util.Objects; -import java.util.UUID; @RestController +@RequestMapping("v1") @RequiredArgsConstructor public class TastingNoteController { private final TastingNoteService tastingNoteService; private final UserService userService; - @GetMapping("/similar-tasting-notes") public TastingNoteSimilarResDto getSimilarTastingNotes( @RequestParam String keyword, @RequestParam(required = false) List exclude, - @RequestParam(defaultValue = "5") int limit) { - + @RequestParam(defaultValue = "5") int limit + ) { return tastingNoteService.findSimilarTastingNotes(keyword, exclude, limit); } - @GetMapping("/ai-similar-tasting-notes/{liquorId}") public GenerateTastingNotesResDTO generateTastingNotes(@PathVariable Long liquorId) { return tastingNoteService.generateTastingNotes(liquorId); } - @PostMapping("/tasting-notes") public ResponseEntity saveTastingNote(@RequestBody @Valid SaveTastingNoteReqDTO saveTastingNoteReqDTO, @AuthenticationPrincipal OAuth2User oAuth2User) { diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/AiTastingNote.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/AiTastingNote.java similarity index 83% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/AiTastingNote.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/AiTastingNote.java index 89e7ef0..486de3a 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/AiTastingNote.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/AiTastingNote.java @@ -1,11 +1,11 @@ -package team_alcoholic.jumo_server.domain.tastingnote.domain; +package team_alcoholic.jumo_server.v1.tastingnote.domain; import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import team_alcoholic.jumo_server.domain.liquor.domain.Liquor; +import team_alcoholic.jumo_server.v1.liquor.domain.Liquor; import team_alcoholic.jumo_server.global.common.domain.BaseEntity; @Entity diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/TastingNote.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/TastingNote.java similarity index 90% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/TastingNote.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/TastingNote.java index 1d7a2cc..ed3036a 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/TastingNote.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/TastingNote.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.tastingnote.domain; +package team_alcoholic.jumo_server.v1.tastingnote.domain; import jakarta.persistence.*; import lombok.*; -import team_alcoholic.jumo_server.domain.liquor.domain.Liquor; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.liquor.domain.Liquor; +import team_alcoholic.jumo_server.v1.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseEntity; @Entity diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/TastingNoteSimilarityVectors.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/TastingNoteSimilarityVectors.java similarity index 85% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/TastingNoteSimilarityVectors.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/TastingNoteSimilarityVectors.java index 40eaaf2..cbfd324 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/domain/TastingNoteSimilarityVectors.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/domain/TastingNoteSimilarityVectors.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.tastingnote.domain; +package team_alcoholic.jumo_server.v1.tastingnote.domain; import jakarta.persistence.*; import lombok.Getter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/AiNotesResDTO.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/AiNotesResDTO.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/AiNotesResDTO.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/AiNotesResDTO.java index 9924851..cf58b63 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/AiNotesResDTO.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/AiNotesResDTO.java @@ -1,7 +1,7 @@ -package team_alcoholic.jumo_server.domain.tastingnote.dto; +package team_alcoholic.jumo_server.v1.tastingnote.dto; import lombok.Builder; -import team_alcoholic.jumo_server.domain.tastingnote.domain.AiTastingNote; +import team_alcoholic.jumo_server.v1.tastingnote.domain.AiTastingNote; public record AiNotesResDTO( String tastingNotesAroma, diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/BaseTastingNoteReqDTO.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/BaseTastingNoteReqDTO.java similarity index 91% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/BaseTastingNoteReqDTO.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/BaseTastingNoteReqDTO.java index bf69ba2..141efca 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/BaseTastingNoteReqDTO.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/BaseTastingNoteReqDTO.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.tastingnote.dto; +package team_alcoholic.jumo_server.v1.tastingnote.dto; import jakarta.validation.constraints.Size; import lombok.Getter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/GenerateTastingNotesResDTO.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/GenerateTastingNotesResDTO.java similarity index 78% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/GenerateTastingNotesResDTO.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/GenerateTastingNotesResDTO.java index 295c832..c0703c8 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/GenerateTastingNotesResDTO.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/GenerateTastingNotesResDTO.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.tastingnote.dto; +package team_alcoholic.jumo_server.v1.tastingnote.dto; import lombok.Getter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/SaveTastingNoteReqDTO.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/SaveTastingNoteReqDTO.java similarity index 60% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/SaveTastingNoteReqDTO.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/SaveTastingNoteReqDTO.java index 9cfd150..79fda27 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/SaveTastingNoteReqDTO.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/SaveTastingNoteReqDTO.java @@ -1,6 +1,5 @@ -package team_alcoholic.jumo_server.domain.tastingnote.dto; +package team_alcoholic.jumo_server.v1.tastingnote.dto; -import jakarta.validation.constraints.Size; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/TastingNoteResDTO.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/TastingNoteResDTO.java similarity index 86% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/TastingNoteResDTO.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/TastingNoteResDTO.java index 14d4710..bcee148 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/TastingNoteResDTO.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/TastingNoteResDTO.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.tastingnote.dto; +package team_alcoholic.jumo_server.v1.tastingnote.dto; import lombok.Builder; -import team_alcoholic.jumo_server.domain.liquor.dto.LiquorResDto; -import team_alcoholic.jumo_server.domain.tastingnote.domain.TastingNote; -import team_alcoholic.jumo_server.domain.user.dto.UserRes; +import team_alcoholic.jumo_server.v1.liquor.dto.LiquorResDto; +import team_alcoholic.jumo_server.v1.tastingnote.domain.TastingNote; +import team_alcoholic.jumo_server.v1.user.dto.UserRes; public record TastingNoteResDTO( Long id, diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/TastingNoteSimilarResDto.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/TastingNoteSimilarResDto.java similarity index 83% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/TastingNoteSimilarResDto.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/TastingNoteSimilarResDto.java index 4bb68f9..a504e3e 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/TastingNoteSimilarResDto.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/TastingNoteSimilarResDto.java @@ -1,8 +1,8 @@ -package team_alcoholic.jumo_server.domain.tastingnote.dto; +package team_alcoholic.jumo_server.v1.tastingnote.dto; import lombok.Builder; import lombok.Getter; -import team_alcoholic.jumo_server.domain.tastingnote.domain.TastingNoteSimilarityVectors; +import team_alcoholic.jumo_server.v1.tastingnote.domain.TastingNoteSimilarityVectors; import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/UpdateTastingNoteReqDTO.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/UpdateTastingNoteReqDTO.java similarity index 72% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/UpdateTastingNoteReqDTO.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/UpdateTastingNoteReqDTO.java index 16bac9a..91cc2b5 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/dto/UpdateTastingNoteReqDTO.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/dto/UpdateTastingNoteReqDTO.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.tastingnote.dto; +package team_alcoholic.jumo_server.v1.tastingnote.dto; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/exception/TastingNoteNotFoundException.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/exception/TastingNoteNotFoundException.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/exception/TastingNoteNotFoundException.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/exception/TastingNoteNotFoundException.java index 1afbcc7..296dca9 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/exception/TastingNoteNotFoundException.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/exception/TastingNoteNotFoundException.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.tastingnote.exception; +package team_alcoholic.jumo_server.v1.tastingnote.exception; import team_alcoholic.jumo_server.global.error.exception.NotFoundException; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/AiTastingNoteRepository.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/AiTastingNoteRepository.java similarity index 51% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/AiTastingNoteRepository.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/AiTastingNoteRepository.java index 94400d6..5bec530 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/AiTastingNoteRepository.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/AiTastingNoteRepository.java @@ -1,7 +1,7 @@ -package team_alcoholic.jumo_server.domain.tastingnote.repository; +package team_alcoholic.jumo_server.v1.tastingnote.repository; import org.springframework.data.jpa.repository.JpaRepository; -import team_alcoholic.jumo_server.domain.tastingnote.domain.AiTastingNote; +import team_alcoholic.jumo_server.v1.tastingnote.domain.AiTastingNote; public interface AiTastingNoteRepository extends JpaRepository { } \ No newline at end of file diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/TastingNoteRepository.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/TastingNoteRepository.java similarity index 85% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/TastingNoteRepository.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/TastingNoteRepository.java index bbbbf2a..a995beb 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/TastingNoteRepository.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/TastingNoteRepository.java @@ -1,10 +1,10 @@ -package team_alcoholic.jumo_server.domain.tastingnote.repository; +package team_alcoholic.jumo_server.v1.tastingnote.repository; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import team_alcoholic.jumo_server.domain.tastingnote.domain.TastingNote; +import team_alcoholic.jumo_server.v1.tastingnote.domain.TastingNote; import java.util.List; import java.util.UUID; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/TastingNoteSimilarityVectorsRepository.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/TastingNoteSimilarityVectorsRepository.java similarity index 83% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/TastingNoteSimilarityVectorsRepository.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/TastingNoteSimilarityVectorsRepository.java index 66d94c0..0d27fdf 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/repository/TastingNoteSimilarityVectorsRepository.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/repository/TastingNoteSimilarityVectorsRepository.java @@ -1,10 +1,10 @@ -package team_alcoholic.jumo_server.domain.tastingnote.repository; +package team_alcoholic.jumo_server.v1.tastingnote.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.data.domain.Pageable; -import team_alcoholic.jumo_server.domain.tastingnote.domain.TastingNoteSimilarityVectors; +import team_alcoholic.jumo_server.v1.tastingnote.domain.TastingNoteSimilarityVectors; import java.util.List; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/service/TastingNoteService.java b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/service/TastingNoteService.java similarity index 90% rename from src/main/java/team_alcoholic/jumo_server/domain/tastingnote/service/TastingNoteService.java rename to src/main/java/team_alcoholic/jumo_server/v1/tastingnote/service/TastingNoteService.java index 0fb35bf..24ff528 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/tastingnote/service/TastingNoteService.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/tastingnote/service/TastingNoteService.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.tastingnote.service; +package team_alcoholic.jumo_server.v1.tastingnote.service; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.RequiredArgsConstructor; @@ -6,17 +6,17 @@ import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import team_alcoholic.jumo_server.domain.liquor.domain.Liquor; -import team_alcoholic.jumo_server.domain.liquor.exception.LiquorNotFoundException; -import team_alcoholic.jumo_server.domain.liquor.repository.LiquorRepository; -import team_alcoholic.jumo_server.domain.tastingnote.domain.AiTastingNote; -import team_alcoholic.jumo_server.domain.tastingnote.domain.TastingNote; -import team_alcoholic.jumo_server.domain.tastingnote.dto.*; -import team_alcoholic.jumo_server.domain.tastingnote.exception.TastingNoteNotFoundException; -import team_alcoholic.jumo_server.domain.tastingnote.repository.AiTastingNoteRepository; -import team_alcoholic.jumo_server.domain.tastingnote.repository.TastingNoteRepository; -import team_alcoholic.jumo_server.domain.tastingnote.repository.TastingNoteSimilarityVectorsRepository; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.liquor.domain.Liquor; +import team_alcoholic.jumo_server.v1.liquor.exception.LiquorNotFoundException; +import team_alcoholic.jumo_server.v1.liquor.repository.LiquorRepository; +import team_alcoholic.jumo_server.v1.tastingnote.domain.AiTastingNote; +import team_alcoholic.jumo_server.v1.tastingnote.domain.TastingNote; +import team_alcoholic.jumo_server.v1.tastingnote.dto.*; +import team_alcoholic.jumo_server.v1.tastingnote.exception.TastingNoteNotFoundException; +import team_alcoholic.jumo_server.v1.tastingnote.repository.AiTastingNoteRepository; +import team_alcoholic.jumo_server.v1.tastingnote.repository.TastingNoteRepository; +import team_alcoholic.jumo_server.v1.tastingnote.repository.TastingNoteSimilarityVectorsRepository; +import team_alcoholic.jumo_server.v1.user.domain.User; import java.nio.file.AccessDeniedException; import java.util.List; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/controller/UserController.java b/src/main/java/team_alcoholic/jumo_server/v1/user/controller/UserController.java similarity index 91% rename from src/main/java/team_alcoholic/jumo_server/domain/user/controller/UserController.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/controller/UserController.java index 99c48c7..b2801b3 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/controller/UserController.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/controller/UserController.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.user.controller; +package team_alcoholic.jumo_server.v1.user.controller; import jakarta.servlet.http.HttpSession; import lombok.RequiredArgsConstructor; @@ -8,16 +8,16 @@ import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.oauth2.core.user.OAuth2User; import org.springframework.web.bind.annotation.*; -import team_alcoholic.jumo_server.domain.user.dto.UserRes; -import team_alcoholic.jumo_server.domain.user.dto.UserUpdateReq; -import team_alcoholic.jumo_server.domain.user.service.UserService; +import team_alcoholic.jumo_server.v1.user.dto.UserRes; +import team_alcoholic.jumo_server.v1.user.dto.UserUpdateReq; +import team_alcoholic.jumo_server.v1.user.service.UserService; import team_alcoholic.jumo_server.global.error.exception.UnauthorizedException; import java.io.IOException; @RequiredArgsConstructor @RestController -@RequestMapping("/users") +@RequestMapping("v1/users") public class UserController { @Value("${service.url}") diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/domain/User.java b/src/main/java/team_alcoholic/jumo_server/v1/user/domain/User.java similarity index 90% rename from src/main/java/team_alcoholic/jumo_server/domain/user/domain/User.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/domain/User.java index ed64929..55b4a39 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/domain/User.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/domain/User.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.user.domain; +package team_alcoholic.jumo_server.v1.user.domain; import jakarta.persistence.*; import lombok.Getter; import lombok.Setter; -import team_alcoholic.jumo_server.domain.user.dto.UserUpdateReq; +import team_alcoholic.jumo_server.v1.user.dto.UserUpdateReq; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; import java.util.UUID; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserOAuth2DTO.java b/src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserOAuth2DTO.java similarity index 92% rename from src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserOAuth2DTO.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserOAuth2DTO.java index a2cff3a..f9e33e1 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserOAuth2DTO.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserOAuth2DTO.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.user.dto; +package team_alcoholic.jumo_server.v1.user.dto; import lombok.Builder; import lombok.Getter; import lombok.Setter; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.user.domain.User; import java.io.Serial; import java.io.Serializable; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserRes.java b/src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserRes.java similarity index 92% rename from src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserRes.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserRes.java index 2880d09..5e4eb56 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserRes.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserRes.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.user.dto; +package team_alcoholic.jumo_server.v1.user.dto; import lombok.Builder; import org.springframework.security.oauth2.core.user.OAuth2User; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.user.domain.User; import java.util.UUID; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserUpdateReq.java b/src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserUpdateReq.java similarity index 87% rename from src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserUpdateReq.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserUpdateReq.java index 3818f18..71b241e 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/dto/UserUpdateReq.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/dto/UserUpdateReq.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.user.dto; +package team_alcoholic.jumo_server.v1.user.dto; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/exception/UserNotFoundException.java b/src/main/java/team_alcoholic/jumo_server/v1/user/exception/UserNotFoundException.java similarity index 82% rename from src/main/java/team_alcoholic/jumo_server/domain/user/exception/UserNotFoundException.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/exception/UserNotFoundException.java index fd9778c..00d5d6d 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/exception/UserNotFoundException.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/exception/UserNotFoundException.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.user.exception; +package team_alcoholic.jumo_server.v1.user.exception; import team_alcoholic.jumo_server.global.error.exception.NotFoundException; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/repository/UserRepository.java b/src/main/java/team_alcoholic/jumo_server/v1/user/repository/UserRepository.java similarity index 80% rename from src/main/java/team_alcoholic/jumo_server/domain/user/repository/UserRepository.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/repository/UserRepository.java index e9b2860..d777ce8 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/repository/UserRepository.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/repository/UserRepository.java @@ -1,7 +1,7 @@ -package team_alcoholic.jumo_server.domain.user.repository; +package team_alcoholic.jumo_server.v1.user.repository; import org.springframework.data.jpa.repository.JpaRepository; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.user.domain.User; import java.util.UUID; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/service/UserService.java b/src/main/java/team_alcoholic/jumo_server/v1/user/service/UserService.java similarity index 91% rename from src/main/java/team_alcoholic/jumo_server/domain/user/service/UserService.java rename to src/main/java/team_alcoholic/jumo_server/v1/user/service/UserService.java index 33cff58..cf5b05d 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/service/UserService.java +++ b/src/main/java/team_alcoholic/jumo_server/v1/user/service/UserService.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.user.service; +package team_alcoholic.jumo_server.v1.user.service; import jakarta.servlet.http.HttpSession; import lombok.RequiredArgsConstructor; @@ -8,14 +8,14 @@ import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import team_alcoholic.jumo_server.domain.auth.dto.CustomOAuth2User; -import team_alcoholic.jumo_server.domain.auth.dto.OAuth2Response; -import team_alcoholic.jumo_server.domain.user.dto.UserRes; -import team_alcoholic.jumo_server.domain.user.dto.UserUpdateReq; -import team_alcoholic.jumo_server.domain.user.exception.UserNotFoundException; -import team_alcoholic.jumo_server.domain.user.repository.UserRepository; -import team_alcoholic.jumo_server.domain.user.domain.User; -import team_alcoholic.jumo_server.domain.user.dto.UserOAuth2DTO; +import team_alcoholic.jumo_server.v1.auth.dto.CustomOAuth2User; +import team_alcoholic.jumo_server.v1.auth.dto.OAuth2Response; +import team_alcoholic.jumo_server.v1.user.dto.UserRes; +import team_alcoholic.jumo_server.v1.user.dto.UserUpdateReq; +import team_alcoholic.jumo_server.v1.user.exception.UserNotFoundException; +import team_alcoholic.jumo_server.v1.user.repository.UserRepository; +import team_alcoholic.jumo_server.v1.user.domain.User; +import team_alcoholic.jumo_server.v1.user.dto.UserOAuth2DTO; import java.util.*; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/Aroma.java b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/Aroma.java similarity index 87% rename from src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/Aroma.java rename to src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/Aroma.java index 9ff0e52..ae8ffa5 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/Aroma.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/Aroma.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.aroma.domain; +package team_alcoholic.jumo_server.v2.aroma.domain; import jakarta.persistence.*; import lombok.Getter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/AromaCategory.java b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/AromaCategory.java similarity index 88% rename from src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/AromaCategory.java rename to src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/AromaCategory.java index b7e8d8e..0385b0b 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/AromaCategory.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/AromaCategory.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.aroma.domain; +package team_alcoholic.jumo_server.v2.aroma.domain; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/AromaSimilarity.java b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/AromaSimilarity.java similarity index 90% rename from src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/AromaSimilarity.java rename to src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/AromaSimilarity.java index eb1d8ad..ac8c748 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/AromaSimilarity.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/AromaSimilarity.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.aroma.domain; +package team_alcoholic.jumo_server.v2.aroma.domain; import jakarta.persistence.*; import lombok.Getter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/CustomAroma.java b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/CustomAroma.java similarity index 88% rename from src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/CustomAroma.java rename to src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/CustomAroma.java index 643b30e..1af9ca0 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/aroma/domain/CustomAroma.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/aroma/domain/CustomAroma.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.aroma.domain; +package team_alcoholic.jumo_server.v2.aroma.domain; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorCategory.java b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorCategory.java similarity index 88% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorCategory.java rename to src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorCategory.java index 7b2347e..a5d7cba 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorCategory.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorCategory.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.liquor.domain; +package team_alcoholic.jumo_server.v2.liquor.domain; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorCategoryPrefer.java b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorCategoryPrefer.java similarity index 81% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorCategoryPrefer.java rename to src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorCategoryPrefer.java index f0d93f9..0f2e98e 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorCategoryPrefer.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorCategoryPrefer.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.liquor.domain; +package team_alcoholic.jumo_server.v2.liquor.domain; import jakarta.persistence.*; import lombok.Getter; -import team_alcoholic.jumo_server.domain.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; +import team_alcoholic.jumo_server.v1.user.domain.User; @Entity @Getter diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorLike.java b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorLike.java similarity index 75% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorLike.java rename to src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorLike.java index 3b8da56..184afeb 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/LiquorLike.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/LiquorLike.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.liquor.domain; +package team_alcoholic.jumo_server.v2.liquor.domain; import jakarta.persistence.*; import lombok.Getter; -import team_alcoholic.jumo_server.domain.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; +import team_alcoholic.jumo_server.v1.user.domain.User; @Entity @Getter @@ -14,7 +14,7 @@ public class LiquorLike extends BaseTimeEntity { @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "liquor_id") - private Liquor liquor; + private NewLiquor liquor; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id") diff --git a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/NewLiquor.java b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/NewLiquor.java similarity index 91% rename from src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/NewLiquor.java rename to src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/NewLiquor.java index 284a468..91a94bf 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/liquor/domain/NewLiquor.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/liquor/domain/NewLiquor.java @@ -1,12 +1,12 @@ -package team_alcoholic.jumo_server.domain.liquor.domain; +package team_alcoholic.jumo_server.v2.liquor.domain; import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import team_alcoholic.jumo_server.domain.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseEntity; +import team_alcoholic.jumo_server.v1.user.domain.User; @Entity diff --git a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/Note.java b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/Note.java similarity index 75% rename from src/main/java/team_alcoholic/jumo_server/domain/note/domain/Note.java rename to src/main/java/team_alcoholic/jumo_server/v2/note/domain/Note.java index 642949e..3863eb1 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/Note.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/Note.java @@ -1,9 +1,9 @@ -package team_alcoholic.jumo_server.domain.note.domain; +package team_alcoholic.jumo_server.v2.note.domain; import jakarta.persistence.*; import lombok.Getter; -import team_alcoholic.jumo_server.domain.liquor.domain.Liquor; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.liquor.domain.Liquor; +import team_alcoholic.jumo_server.v1.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; @Entity diff --git a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteAroma.java b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteAroma.java similarity index 77% rename from src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteAroma.java rename to src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteAroma.java index a6ce150..57dc8da 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteAroma.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteAroma.java @@ -1,8 +1,8 @@ -package team_alcoholic.jumo_server.domain.note.domain; +package team_alcoholic.jumo_server.v2.note.domain; import jakarta.persistence.*; import lombok.Getter; -import team_alcoholic.jumo_server.domain.aroma.domain.Aroma; +import team_alcoholic.jumo_server.v2.aroma.domain.Aroma; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; @Entity diff --git a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteComment.java b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteComment.java similarity index 83% rename from src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteComment.java rename to src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteComment.java index 0510586..759aeef 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteComment.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteComment.java @@ -1,8 +1,8 @@ -package team_alcoholic.jumo_server.domain.note.domain; +package team_alcoholic.jumo_server.v2.note.domain; import jakarta.persistence.*; import lombok.Getter; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; @Entity diff --git a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteImage.java b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteImage.java similarity index 86% rename from src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteImage.java rename to src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteImage.java index 4ae37e7..2e2a574 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteImage.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteImage.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.note.domain; +package team_alcoholic.jumo_server.v2.note.domain; import jakarta.persistence.*; import lombok.Getter; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteLike.java b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteLike.java similarity index 77% rename from src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteLike.java rename to src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteLike.java index a7684aa..55c4c15 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/NoteLike.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/NoteLike.java @@ -1,8 +1,8 @@ -package team_alcoholic.jumo_server.domain.note.domain; +package team_alcoholic.jumo_server.v2.note.domain; import jakarta.persistence.*; import lombok.Getter; -import team_alcoholic.jumo_server.domain.user.domain.User; +import team_alcoholic.jumo_server.v1.user.domain.User; import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; @Entity diff --git a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/PurchaseNote.java b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/PurchaseNote.java similarity index 89% rename from src/main/java/team_alcoholic/jumo_server/domain/note/domain/PurchaseNote.java rename to src/main/java/team_alcoholic/jumo_server/v2/note/domain/PurchaseNote.java index 5f76fd0..846d937 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/PurchaseNote.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/PurchaseNote.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.note.domain; +package team_alcoholic.jumo_server.v2.note.domain; import jakarta.persistence.DiscriminatorValue; import jakarta.persistence.Entity; diff --git a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/TastingNote.java b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/TastingNote.java similarity index 91% rename from src/main/java/team_alcoholic/jumo_server/domain/note/domain/TastingNote.java rename to src/main/java/team_alcoholic/jumo_server/v2/note/domain/TastingNote.java index 18adee7..0c48df2 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/note/domain/TastingNote.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/note/domain/TastingNote.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.note.domain; +package team_alcoholic.jumo_server.v2.note.domain; import jakarta.persistence.DiscriminatorValue; import jakarta.persistence.Entity; diff --git a/src/main/java/team_alcoholic/jumo_server/v2/user/domain/NewUser.java b/src/main/java/team_alcoholic/jumo_server/v2/user/domain/NewUser.java new file mode 100644 index 0000000..9c76258 --- /dev/null +++ b/src/main/java/team_alcoholic/jumo_server/v2/user/domain/NewUser.java @@ -0,0 +1,42 @@ +package team_alcoholic.jumo_server.v2.user.domain; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import lombok.Getter; +import team_alcoholic.jumo_server.global.common.domain.BaseTimeEntity; + +import java.util.UUID; + + +/** + * 사용자 정보를 담는 엔티티 + */ +@Entity(name = "user_new") +@Getter +public class NewUser extends BaseTimeEntity { + + @Id + @GeneratedValue(strategy= GenerationType.IDENTITY) + private Long id; + + private String provider; + private String providerId; + private String name; + private String nickname; + private String profileThumbnailImage; + private UUID userUuid = UUID.randomUUID(); + +// /** +// * 사용자 정보 수정 시 UserUpdateReq dto로부터 User 엔티티를 수정하는 메서드 +// * @param dto +// */ +// public void updateFromDto(UserUpdateReq dto) { +// if (dto.getProfileNickname() != null) this.nickname = dto.getProfileNickname(); +// if (dto.getProfileThumbnailImage() != null) this.profileThumbnailImage = dto.getProfileThumbnailImage(); +// +// // UserImage 처리는 추후 구현 예정 +// // if (dto.getProfileImage() != null) this.profileImage = dto.getProfileImage(); +// } +} \ No newline at end of file diff --git a/src/main/java/team_alcoholic/jumo_server/domain/user/domain/UserImage.java b/src/main/java/team_alcoholic/jumo_server/v2/user/domain/UserImage.java similarity index 87% rename from src/main/java/team_alcoholic/jumo_server/domain/user/domain/UserImage.java rename to src/main/java/team_alcoholic/jumo_server/v2/user/domain/UserImage.java index 0575a8a..79d5ec2 100644 --- a/src/main/java/team_alcoholic/jumo_server/domain/user/domain/UserImage.java +++ b/src/main/java/team_alcoholic/jumo_server/v2/user/domain/UserImage.java @@ -1,4 +1,4 @@ -package team_alcoholic.jumo_server.domain.user.domain; +package team_alcoholic.jumo_server.v2.user.domain; import jakarta.persistence.*; import lombok.Getter; diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 1e11c1e..8683b16 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -2,7 +2,7 @@ spring.config.import=optional:aws-secretsmanager:dev/jumo/server # Application settings spring.application.name=jumo-server -server.servlet.context-path=/api/v1 +server.servlet.context-path=/api service.url=https://dev.jumo.im # Swagger settings #springdoc.swagger-ui.enabled=false diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index ae63324..7192137 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -1,6 +1,6 @@ # Application settings spring.application.name=jumo-server -server.servlet.context-path=/api/v1 +server.servlet.context-path=/api service.url=http://localhost:3000 # Swagger settings diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index 4f69b4b..0e05435 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -3,7 +3,7 @@ spring.config.import=aws-secretsmanager:prod/jumo/server # Application settings spring.application.name=jumo-server -server.servlet.context-path=/api/v1 +server.servlet.context-path=/api service.url=https://jumo.im # Swagger settings diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties index 9665c75..b31169d 100644 --- a/src/main/resources/application-test.properties +++ b/src/main/resources/application-test.properties @@ -3,7 +3,7 @@ # Application settings spring.application.name=jumo-server -server.servlet.context-path=/api/v1 +server.servlet.context-path=/api service.url=https://dev.jumo.im # Swagger settings