Skip to content

Commit

Permalink
test: 좋아요 성능 테스트를 위한 서버 재배포
Browse files Browse the repository at this point in the history
  • Loading branch information
EunChanNam committed Nov 27, 2023
1 parent b86f6e4 commit aa02979
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ public class WeShareWishHairApplication {
public static void main(String[] args) {
SpringApplication.run(WeShareWishHairApplication.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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<>()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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(
"[email protected]",
Password.encrypt("hello123@", passwordEncoder),
"userA",
"hello",
Sex.MAN
));
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ decorator:
#JWT key
jwt:
secret-key: abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc
access-token-validity: 1800000
access-token-validity: 180000000
refresh-token-validity: 259200000

# 네이버 클라우드 오브젝트 스토리지
Expand Down

0 comments on commit aa02979

Please sign in to comment.