diff --git a/src/main/java/com/inq/wishhair/wesharewishhair/WeShareWishHairApplication.java b/src/main/java/com/inq/wishhair/wesharewishhair/WeShareWishHairApplication.java index a4353b4..3c2a1ed 100644 --- a/src/main/java/com/inq/wishhair/wesharewishhair/WeShareWishHairApplication.java +++ b/src/main/java/com/inq/wishhair/wesharewishhair/WeShareWishHairApplication.java @@ -9,5 +9,4 @@ public class WeShareWishHairApplication { public static void main(String[] args) { SpringApplication.run(WeShareWishHairApplication.class, args); } - } diff --git a/src/main/java/com/inq/wishhair/wesharewishhair/hairstyle/application/HairStyleFindService.java b/src/main/java/com/inq/wishhair/wesharewishhair/hairstyle/application/HairStyleFindService.java index 815fabc..8d9e25f 100644 --- a/src/main/java/com/inq/wishhair/wesharewishhair/hairstyle/application/HairStyleFindService.java +++ b/src/main/java/com/inq/wishhair/wesharewishhair/hairstyle/application/HairStyleFindService.java @@ -1,12 +1,16 @@ package com.inq.wishhair.wesharewishhair.hairstyle.application; +import java.util.ArrayList; + import org.springframework.stereotype.Service; import com.inq.wishhair.wesharewishhair.global.exception.ErrorCode; import com.inq.wishhair.wesharewishhair.global.exception.WishHairException; import com.inq.wishhair.wesharewishhair.hairstyle.domain.HairStyle; import com.inq.wishhair.wesharewishhair.hairstyle.domain.HairStyleRepository; +import com.inq.wishhair.wesharewishhair.user.domain.entity.Sex; +import jakarta.annotation.PostConstruct; import lombok.RequiredArgsConstructor; @Service @@ -19,4 +23,9 @@ public HairStyle getById(Long id) { return hairStyleRepository.findById(id) .orElseThrow(() -> new WishHairException(ErrorCode.NOT_EXIST_KEY)); } + + @PostConstruct + public void setUpHairStyle() { + hairStyleRepository.save(HairStyle.createHairStyle("hairStyleA", Sex.MAN, new ArrayList<>(), new ArrayList<>())); + } } diff --git a/src/main/java/com/inq/wishhair/wesharewishhair/user/application/UserService.java b/src/main/java/com/inq/wishhair/wesharewishhair/user/application/UserService.java index 2d008ed..bf873fa 100644 --- a/src/main/java/com/inq/wishhair/wesharewishhair/user/application/UserService.java +++ b/src/main/java/com/inq/wishhair/wesharewishhair/user/application/UserService.java @@ -11,6 +11,7 @@ import com.inq.wishhair.wesharewishhair.global.exception.WishHairException; import com.inq.wishhair.wesharewishhair.hairstyle.domain.hashtag.Tag; import com.inq.wishhair.wesharewishhair.review.application.ReviewService; +import com.inq.wishhair.wesharewishhair.user.domain.entity.Sex; import com.inq.wishhair.wesharewishhair.user.presentation.dto.request.PasswordRefreshRequest; import com.inq.wishhair.wesharewishhair.user.presentation.dto.request.PasswordUpdateRequest; import com.inq.wishhair.wesharewishhair.user.presentation.dto.request.SignUpRequest; @@ -25,6 +26,7 @@ import com.inq.wishhair.wesharewishhair.user.application.utils.UserValidator; import com.inq.wishhair.wesharewishhair.user.domain.AiConnector; +import jakarta.annotation.PostConstruct; import lombok.RequiredArgsConstructor; @Service @@ -109,4 +111,15 @@ private void confirmPassword(User user, String password) { throw new WishHairException(ErrorCode.USER_WRONG_PASSWORD); } } + + @PostConstruct + public void setUp() { + userRepository.save(User.createUser( + "namhm23@naver.com", + Password.encrypt("hello123@", passwordEncoder), + "userA", + "hello", + Sex.MAN + )); + } } diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index aea798b..a44ee49 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -71,7 +71,7 @@ decorator: #JWT key jwt: secret-key: abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc - access-token-validity: 1800000 + access-token-validity: 180000000 refresh-token-validity: 259200000 # 네이버 클라우드 오브젝트 스토리지