diff --git a/src/main/java/chzzk/grassdiary/domain/diary/service/DiaryService.java b/src/main/java/chzzk/grassdiary/domain/diary/service/DiaryService.java index 2f1e0759..579efedc 100644 --- a/src/main/java/chzzk/grassdiary/domain/diary/service/DiaryService.java +++ b/src/main/java/chzzk/grassdiary/domain/diary/service/DiaryService.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Random; +import java.util.concurrent.ThreadLocalRandom; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; @@ -213,9 +214,7 @@ private void updateTags(Diary diary, List newHashtags) { } private int makeRewardPoint() { - long seed = System.currentTimeMillis(); - Random random = new Random(seed); - return 50 + (random.nextInt(6) * 10); + return 50 + (ThreadLocalRandom.current().nextInt(6) * 10); } private void saveRewardPointAndHistory(Member member, int rewardPoint) {