diff --git a/src/main/java/com/book_everywhere/common/jwt/filter/CustomSuccessHandler.java b/src/main/java/com/book_everywhere/common/jwt/filter/CustomSuccessHandler.java index cf7903f..0ec648f 100644 --- a/src/main/java/com/book_everywhere/common/jwt/filter/CustomSuccessHandler.java +++ b/src/main/java/com/book_everywhere/common/jwt/filter/CustomSuccessHandler.java @@ -1,6 +1,6 @@ package com.book_everywhere.common.jwt.filter; -import com.book_everywhere.common.auth.dto.CustomOAuth2User; +import com.book_everywhere.domain.auth.dto.CustomOAuth2User; import com.book_everywhere.common.jwt.token.JwtProvider; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; diff --git a/src/main/java/com/book_everywhere/common/jwt/filter/JwtFilter.java b/src/main/java/com/book_everywhere/common/jwt/filter/JwtFilter.java index 550d2af..78c339c 100644 --- a/src/main/java/com/book_everywhere/common/jwt/filter/JwtFilter.java +++ b/src/main/java/com/book_everywhere/common/jwt/filter/JwtFilter.java @@ -1,7 +1,7 @@ package com.book_everywhere.common.jwt.filter; -import com.book_everywhere.common.auth.dto.CustomOAuth2User; -import com.book_everywhere.common.auth.dto.UserDto; +import com.book_everywhere.domain.auth.dto.CustomOAuth2User; +import com.book_everywhere.domain.auth.dto.UserDto; import com.book_everywhere.common.jwt.token.JwtProvider; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; @@ -15,8 +15,6 @@ import org.springframework.web.filter.OncePerRequestFilter; import java.io.IOException; -import java.util.Arrays; -import java.util.Collections; @RequiredArgsConstructor public class JwtFilter extends OncePerRequestFilter { diff --git a/src/main/java/com/book_everywhere/common/redis/RedisConfig.java b/src/main/java/com/book_everywhere/common/redis/RedisConfig.java index 0c50197..0fe98fa 100644 --- a/src/main/java/com/book_everywhere/common/redis/RedisConfig.java +++ b/src/main/java/com/book_everywhere/common/redis/RedisConfig.java @@ -13,6 +13,8 @@ @RequiredArgsConstructor @Configuration @EnableRedisRepositories +//@EnableJpaRepositories(basePackages = "com.book_everywhere.common.auth.repository") +//@EnableRedisRepositories(basePackages = "com.book_everywhere.common.cache.repository") public class RedisConfig { // private static final Logger logger = LoggerFactory.getLogger(RedisConfig.class); diff --git a/src/main/java/com/book_everywhere/common/auth/config/SecurityConfig.java b/src/main/java/com/book_everywhere/domain/auth/config/SecurityConfig.java similarity index 97% rename from src/main/java/com/book_everywhere/common/auth/config/SecurityConfig.java rename to src/main/java/com/book_everywhere/domain/auth/config/SecurityConfig.java index 1d0582d..c3a6e61 100644 --- a/src/main/java/com/book_everywhere/common/auth/config/SecurityConfig.java +++ b/src/main/java/com/book_everywhere/domain/auth/config/SecurityConfig.java @@ -1,6 +1,6 @@ -package com.book_everywhere.common.auth.config; +package com.book_everywhere.domain.auth.config; -import com.book_everywhere.common.auth.service.CustomOAuth2UserService; +import com.book_everywhere.domain.auth.service.CustomOAuth2UserService; import com.book_everywhere.common.jwt.filter.JwtFilter; import com.book_everywhere.common.jwt.token.JwtProvider; import com.book_everywhere.common.jwt.filter.CustomSuccessHandler; diff --git a/src/main/java/com/book_everywhere/common/auth/dto/CustomOAuth2User.java b/src/main/java/com/book_everywhere/domain/auth/dto/CustomOAuth2User.java similarity index 95% rename from src/main/java/com/book_everywhere/common/auth/dto/CustomOAuth2User.java rename to src/main/java/com/book_everywhere/domain/auth/dto/CustomOAuth2User.java index f0459da..219cc15 100644 --- a/src/main/java/com/book_everywhere/common/auth/dto/CustomOAuth2User.java +++ b/src/main/java/com/book_everywhere/domain/auth/dto/CustomOAuth2User.java @@ -1,4 +1,4 @@ -package com.book_everywhere.common.auth.dto; +package com.book_everywhere.domain.auth.dto; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.oauth2.core.user.OAuth2User; diff --git a/src/main/java/com/book_everywhere/common/auth/dto/OAuthAttributes.java b/src/main/java/com/book_everywhere/domain/auth/dto/OAuthAttributes.java similarity index 90% rename from src/main/java/com/book_everywhere/common/auth/dto/OAuthAttributes.java rename to src/main/java/com/book_everywhere/domain/auth/dto/OAuthAttributes.java index 8c48f32..6866c35 100644 --- a/src/main/java/com/book_everywhere/common/auth/dto/OAuthAttributes.java +++ b/src/main/java/com/book_everywhere/domain/auth/dto/OAuthAttributes.java @@ -1,7 +1,7 @@ -package com.book_everywhere.common.auth.dto; +package com.book_everywhere.domain.auth.dto; -import com.book_everywhere.common.auth.entity.Role; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.Role; +import com.book_everywhere.domain.auth.entity.User; import lombok.Builder; import lombok.Getter; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/book_everywhere/common/auth/dto/UserDto.java b/src/main/java/com/book_everywhere/domain/auth/dto/UserDto.java similarity index 70% rename from src/main/java/com/book_everywhere/common/auth/dto/UserDto.java rename to src/main/java/com/book_everywhere/domain/auth/dto/UserDto.java index f9ee618..8171f05 100644 --- a/src/main/java/com/book_everywhere/common/auth/dto/UserDto.java +++ b/src/main/java/com/book_everywhere/domain/auth/dto/UserDto.java @@ -1,4 +1,4 @@ -package com.book_everywhere.common.auth.dto; +package com.book_everywhere.domain.auth.dto; import lombok.Data; diff --git a/src/main/java/com/book_everywhere/common/auth/entity/Role.java b/src/main/java/com/book_everywhere/domain/auth/entity/Role.java similarity index 50% rename from src/main/java/com/book_everywhere/common/auth/entity/Role.java rename to src/main/java/com/book_everywhere/domain/auth/entity/Role.java index 65e415d..dadeddd 100644 --- a/src/main/java/com/book_everywhere/common/auth/entity/Role.java +++ b/src/main/java/com/book_everywhere/domain/auth/entity/Role.java @@ -1,4 +1,4 @@ -package com.book_everywhere.common.auth.entity; +package com.book_everywhere.domain.auth.entity; public enum Role { ROLE_ADMIN,ROLE_MEMBER diff --git a/src/main/java/com/book_everywhere/common/auth/entity/User.java b/src/main/java/com/book_everywhere/domain/auth/entity/User.java similarity index 96% rename from src/main/java/com/book_everywhere/common/auth/entity/User.java rename to src/main/java/com/book_everywhere/domain/auth/entity/User.java index bbe2bf0..88ec6ea 100644 --- a/src/main/java/com/book_everywhere/common/auth/entity/User.java +++ b/src/main/java/com/book_everywhere/domain/auth/entity/User.java @@ -1,4 +1,4 @@ -package com.book_everywhere.common.auth.entity; +package com.book_everywhere.domain.auth.entity; import com.book_everywhere.common.entity.BaseTimeEntity; import com.book_everywhere.domain.review.entity.Review; diff --git a/src/main/java/com/book_everywhere/common/auth/repository/UserRepository.java b/src/main/java/com/book_everywhere/domain/auth/repository/UserRepository.java similarity index 75% rename from src/main/java/com/book_everywhere/common/auth/repository/UserRepository.java rename to src/main/java/com/book_everywhere/domain/auth/repository/UserRepository.java index b9818fa..b41aadd 100644 --- a/src/main/java/com/book_everywhere/common/auth/repository/UserRepository.java +++ b/src/main/java/com/book_everywhere/domain/auth/repository/UserRepository.java @@ -1,6 +1,6 @@ -package com.book_everywhere.common.auth.repository; +package com.book_everywhere.domain.auth.repository; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.User; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/book_everywhere/common/auth/service/CustomOAuth2UserService.java b/src/main/java/com/book_everywhere/domain/auth/service/CustomOAuth2UserService.java similarity index 82% rename from src/main/java/com/book_everywhere/common/auth/service/CustomOAuth2UserService.java rename to src/main/java/com/book_everywhere/domain/auth/service/CustomOAuth2UserService.java index f35d789..3642217 100644 --- a/src/main/java/com/book_everywhere/common/auth/service/CustomOAuth2UserService.java +++ b/src/main/java/com/book_everywhere/domain/auth/service/CustomOAuth2UserService.java @@ -1,11 +1,11 @@ -package com.book_everywhere.common.auth.service; - -import com.book_everywhere.common.auth.dto.CustomOAuth2User; -import com.book_everywhere.common.auth.dto.OAuthAttributes; -import com.book_everywhere.common.auth.dto.UserDto; -import com.book_everywhere.common.auth.entity.Role; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +package com.book_everywhere.domain.auth.service; + +import com.book_everywhere.domain.auth.dto.CustomOAuth2User; +import com.book_everywhere.domain.auth.dto.OAuthAttributes; +import com.book_everywhere.domain.auth.dto.UserDto; +import com.book_everywhere.domain.auth.entity.Role; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import jakarta.servlet.http.HttpSession; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/book_everywhere/domain/likes/entity/Likes.java b/src/main/java/com/book_everywhere/domain/likes/entity/Likes.java index 122b5e7..c884c24 100644 --- a/src/main/java/com/book_everywhere/domain/likes/entity/Likes.java +++ b/src/main/java/com/book_everywhere/domain/likes/entity/Likes.java @@ -1,6 +1,6 @@ package com.book_everywhere.domain.likes.entity; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.User; import com.book_everywhere.common.entity.BaseTimeEntity; import com.book_everywhere.domain.review.entity.Review; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/src/main/java/com/book_everywhere/domain/likes/service/LikesServiceImpl.java b/src/main/java/com/book_everywhere/domain/likes/service/LikesServiceImpl.java index e2595a5..492ce40 100644 --- a/src/main/java/com/book_everywhere/domain/likes/service/LikesServiceImpl.java +++ b/src/main/java/com/book_everywhere/domain/likes/service/LikesServiceImpl.java @@ -1,7 +1,7 @@ package com.book_everywhere.domain.likes.service; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import com.book_everywhere.domain.likes.repository.LikesRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/book_everywhere/domain/pin/entity/Visit.java b/src/main/java/com/book_everywhere/domain/pin/entity/Visit.java index e7c6bee..28927d3 100644 --- a/src/main/java/com/book_everywhere/domain/pin/entity/Visit.java +++ b/src/main/java/com/book_everywhere/domain/pin/entity/Visit.java @@ -1,6 +1,6 @@ package com.book_everywhere.domain.pin.entity; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.User; import com.book_everywhere.common.entity.BaseTimeEntity; import jakarta.persistence.*; import lombok.*; diff --git a/src/main/java/com/book_everywhere/domain/pin/service/VisitServiceImpl.java b/src/main/java/com/book_everywhere/domain/pin/service/VisitServiceImpl.java index f8b5434..343cd0f 100644 --- a/src/main/java/com/book_everywhere/domain/pin/service/VisitServiceImpl.java +++ b/src/main/java/com/book_everywhere/domain/pin/service/VisitServiceImpl.java @@ -3,8 +3,8 @@ import com.book_everywhere.domain.pin.entity.Pin; import com.book_everywhere.domain.pin.repository.PinRepository; import com.book_everywhere.domain.pin.repository.VisitRepository; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import com.book_everywhere.domain.pin.entity.Visit; import com.book_everywhere.domain.review.dto.ReviewRespDto; import com.book_everywhere.common.exception.customs.CustomErrorCode; diff --git a/src/main/java/com/book_everywhere/domain/review/dto/ReviewRespDto.java b/src/main/java/com/book_everywhere/domain/review/dto/ReviewRespDto.java index 4c17215..5de0c82 100644 --- a/src/main/java/com/book_everywhere/domain/review/dto/ReviewRespDto.java +++ b/src/main/java/com/book_everywhere/domain/review/dto/ReviewRespDto.java @@ -2,7 +2,7 @@ import com.book_everywhere.domain.book.dto.BookRespDto; import com.book_everywhere.domain.book.entity.Book; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.User; import com.book_everywhere.domain.pin.dto.PinRespDto; import com.book_everywhere.domain.pin.entity.Pin; import com.book_everywhere.domain.review.entity.Review; diff --git a/src/main/java/com/book_everywhere/domain/review/entity/Review.java b/src/main/java/com/book_everywhere/domain/review/entity/Review.java index 41fd732..919322c 100644 --- a/src/main/java/com/book_everywhere/domain/review/entity/Review.java +++ b/src/main/java/com/book_everywhere/domain/review/entity/Review.java @@ -1,6 +1,6 @@ package com.book_everywhere.domain.review.entity; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.User; import com.book_everywhere.domain.book.entity.Book; import com.book_everywhere.common.entity.BaseTimeEntity; import com.book_everywhere.domain.pin.entity.Pin; diff --git a/src/main/java/com/book_everywhere/domain/review/service/ReviewServiceImpl.java b/src/main/java/com/book_everywhere/domain/review/service/ReviewServiceImpl.java index ebfdee2..9ac2e11 100644 --- a/src/main/java/com/book_everywhere/domain/review/service/ReviewServiceImpl.java +++ b/src/main/java/com/book_everywhere/domain/review/service/ReviewServiceImpl.java @@ -8,8 +8,8 @@ import com.book_everywhere.domain.pin.repository.PinRepository; import com.book_everywhere.domain.review.entity.Review; import com.book_everywhere.domain.review.repository.ReviewRepository; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import com.book_everywhere.domain.tag.service.TaggedService; import com.book_everywhere.common.exception.customs.CustomErrorCode; import com.book_everywhere.common.exception.customs.EntityNotFoundException; diff --git a/src/main/java/com/book_everywhere/domain/tag/entity/Tagged.java b/src/main/java/com/book_everywhere/domain/tag/entity/Tagged.java index 1b647c9..a71859c 100644 --- a/src/main/java/com/book_everywhere/domain/tag/entity/Tagged.java +++ b/src/main/java/com/book_everywhere/domain/tag/entity/Tagged.java @@ -2,7 +2,7 @@ import com.book_everywhere.common.entity.BaseTimeEntity; import com.book_everywhere.domain.pin.entity.Pin; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.User; import jakarta.persistence.*; import lombok.*; diff --git a/src/main/java/com/book_everywhere/domain/tag/service/TaggedServiceImpl.java b/src/main/java/com/book_everywhere/domain/tag/service/TaggedServiceImpl.java index 95a6c1d..54b2ee4 100644 --- a/src/main/java/com/book_everywhere/domain/tag/service/TaggedServiceImpl.java +++ b/src/main/java/com/book_everywhere/domain/tag/service/TaggedServiceImpl.java @@ -7,8 +7,8 @@ import com.book_everywhere.domain.tag.repository.TagRepository; import com.book_everywhere.domain.tag.entity.Tagged; import com.book_everywhere.domain.tag.repository.TaggedRepository; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import com.book_everywhere.domain.review.dto.ReviewRespDto; import com.book_everywhere.common.exception.customs.CustomErrorCode; import com.book_everywhere.common.exception.customs.EntityNotFoundException; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3b3cc2d..a714b6b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -6,6 +6,11 @@ spring: blue: blue, common, secret green: green, common, secret + data: + redis: + repositories: + enabled: false + server: env: blue diff --git a/src/test/java/com/book_everywhere/domain/auth/UserTestBuilder.java b/src/test/java/com/book_everywhere/domain/auth/UserTestBuilder.java index 85262f6..c46c3e3 100644 --- a/src/test/java/com/book_everywhere/domain/auth/UserTestBuilder.java +++ b/src/test/java/com/book_everywhere/domain/auth/UserTestBuilder.java @@ -1,8 +1,8 @@ package com.book_everywhere.domain.auth; -import com.book_everywhere.common.auth.entity.Role; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.Role; +import com.book_everywhere.domain.auth.entity.User; import java.util.ArrayList; diff --git a/src/test/java/com/book_everywhere/domain/book/repository/BookRepositoryTest.java b/src/test/java/com/book_everywhere/domain/book/repository/BookRepositoryTest.java index 46fdd93..edb21f1 100644 --- a/src/test/java/com/book_everywhere/domain/book/repository/BookRepositoryTest.java +++ b/src/test/java/com/book_everywhere/domain/book/repository/BookRepositoryTest.java @@ -1,7 +1,7 @@ package com.book_everywhere.domain.book.repository; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import com.book_everywhere.domain.book.entity.Book; import com.book_everywhere.domain.auth.UserTestBuilder; import com.book_everywhere.domain.book.dto.BookRespDtoBuilder; diff --git a/src/test/java/com/book_everywhere/domain/likes/repository/LikesRepositoryTest.java b/src/test/java/com/book_everywhere/domain/likes/repository/LikesRepositoryTest.java index 1fe4f18..0a35458 100644 --- a/src/test/java/com/book_everywhere/domain/likes/repository/LikesRepositoryTest.java +++ b/src/test/java/com/book_everywhere/domain/likes/repository/LikesRepositoryTest.java @@ -1,7 +1,7 @@ package com.book_everywhere.domain.likes.repository; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import com.book_everywhere.domain.book.entity.Book; import com.book_everywhere.domain.book.repository.BookRepository; import com.book_everywhere.domain.auth.UserTestBuilder; diff --git a/src/test/java/com/book_everywhere/domain/review/dto/ReviewRespDtoTestBuilder.java b/src/test/java/com/book_everywhere/domain/review/dto/ReviewRespDtoTestBuilder.java index ac5c551..fce54ea 100644 --- a/src/test/java/com/book_everywhere/domain/review/dto/ReviewRespDtoTestBuilder.java +++ b/src/test/java/com/book_everywhere/domain/review/dto/ReviewRespDtoTestBuilder.java @@ -7,7 +7,7 @@ import com.book_everywhere.domain.book.dto.BookRespDto; import com.book_everywhere.domain.pin.dto.PinRespDto; import com.book_everywhere.domain.review.entity.Review; -import com.book_everywhere.common.auth.entity.User; +import com.book_everywhere.domain.auth.entity.User; import java.util.List; diff --git a/src/test/java/com/book_everywhere/domain/review/service/ReviewServiceTest.java b/src/test/java/com/book_everywhere/domain/review/service/ReviewServiceTest.java index f0127ec..ffdaf89 100644 --- a/src/test/java/com/book_everywhere/domain/review/service/ReviewServiceTest.java +++ b/src/test/java/com/book_everywhere/domain/review/service/ReviewServiceTest.java @@ -1,7 +1,7 @@ package com.book_everywhere.domain.review.service; -import com.book_everywhere.common.auth.entity.User; -import com.book_everywhere.common.auth.repository.UserRepository; +import com.book_everywhere.domain.auth.entity.User; +import com.book_everywhere.domain.auth.repository.UserRepository; import com.book_everywhere.domain.book.dto.BookRespDto; import com.book_everywhere.domain.book.repository.BookRepository; import com.book_everywhere.domain.auth.UserTestBuilder;