code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -0,0 +1,57 @@
+package christmas.controller;
+
+import christmas.domain.*;
+import christmas.dto.OrderDTO;
+import christmas.util.IntParser;
+import christmas.util.OrderParser;
+import christmas.util.RetryExecutor;
+import christmas.view.InputView;
+import christmas.view.OutputView;
+
+import java.util.List;
+
+publ... | Java | ์ ๋ ํจ์ํ ์ธํฐํ์ด์ค๋ผ๋ ๊ฑธ ์ฒ์ ์จ๋ดค๋ต๋๋ค! 3์ฃผ์ฐจ ์ฝ๋๋ฆฌ๋ทฐ๋ฅผ ํ๋ฉด์ ์ด๊นจ๋๋จธ๋ก ๋ฐฐ์ด๊ฑฐ๋ผ, @HongYeseul ๋๋ ์ด๋ฒ ์ฝ๋๋ฆฌ๋ทฐ๋ฅผ ๊ธฐํ๋ก ํ๋ฒ ๊ณต๋ถํด๋ณด์๋๊ฑด ์ด๋จ๊น์? ๐ |
@@ -0,0 +1,26 @@
+package christmas.domain;
+
+import java.util.Arrays;
+
+public enum Badge {
+ SANTA("์ฐํ", 20000),
+ TREE("ํธ๋ฆฌ", 10000),
+ STAR("๋ณ", 5000),
+ NOTHING("์์", 0);
+
+ private final String badgeName;
+ private final int threshold;
+
+ Badge(String badgeName, int threshold) {
+ t... | Java | ์ ๋ง ๋๋๊ฒ๋ ์ ๋ 1์ฃผ์ฐจ์ 2์ฃผ์ฐจ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ํ๋ฉด์ ๋๋ถ๋ถ์ ๋ฆฌ๋ทฐ์ `stream`์ฌ์ฉ์ ์ ํ์๋๊ฒ ๋ถ๋ฝ๋ค! ๋ผ๋์์ผ๋ก ๋ง์ด ๋ฆฌ๋ทฐ๋ฅผ ๋จ๊ธฐ๊ณ ๋ค๋
์ด์. ๊ทธ๋ ๊ฒ ๋ง์ ๋ถ๋ค์ ์ฝ๋๋ฅผ ๋ณด๋ฉด์ `stream`๊ณผ ์ ์ ์น์ํด์ง๋ค ๋ณด๋ ์ ๋ `stream`์ ํ๋ฒ ์จ๋ณผ๊น? ๋ผ๋ ์๊ฐ์ด ๋ค์๊ณ , ๊ทธ๋ ๊ฒ ์ ์ ์ต์ํด์ง ๊ฒ ๊ฐ์์! ๐
4์ฃผ์ฐจ๊ฐ ๋๋ ์ง๊ธ์ ํ๊ต ๋์๊ด์์ '์ด๊ฒ์ด ์๋ฐ๋ค'๋ผ๋ ์ฑ
์ ๋น๋ ค์ ์ฝ๊ณ ์์ด์. ์๋ฐ์ ์ต์ํด์ง๊ธด ํ์ง๋ง, ๊ทธ๋๋ ์ปฌ๋ ์
์ด๋ ์คํธ๋ฆผ๊ณผ ๊ฐ์ ๋ถ๋ถ์ ์ ๋๋ก ๊ณต๋ถํ๊ณ ์ถ์ด์์. ์ด๋ฐ ์๋ฐ ์์ ์ ํ๋ ์ ํ์
์ ๊ธฐ๋ณธ ๋ฌธ๋ฒ์ ์ ๋ฆฌํ์๋ ์๊ฐ์... |
@@ -0,0 +1,38 @@
+package christmas.util;
+
+import christmas.config.ErrorMessage;
+
+public class IntParser {
+ private static final int MAX_STRING_LENGTH = 11;
+
+ private IntParser() {
+ // ์ธ์คํด์ค ์์ฑ ๋ฐฉ์ง
+ }
+
+ public static int parseIntOrThrow(String numeric) {
+ validateNumericStringLength(... | Java | ๋ชจ๋ ๋ฉ์๋๊ฐ `static`์ธ ์ ํธ๋ฆฌํฐ์ฑ ํด๋์ค์ ๊ฒฝ์ฐ `new` ํค์๋๋ฅผ ์ฌ์ฉํด ๊ฐ์ฒด๋ฅผ ์์ฑํ ํ์๊ฐ ์ ํ ์๋ค๊ณ ์๊ฐํ์ต๋๋ค. ๊ทธ๋์ ํน์๋ผ๋ ์๋์น ์๊ฒ ๊ฐ์ฒด๊ฐ ์์ฑ๋ ๊ฒฝ์ฐ๋ฅผ ๋ฐฉ์งํ๊ธฐ ์ํด ์์ฑ์๋ฅผ `private`์ผ๋ก ์ ์ธํ๊ณ , ๋น ์์ฑ์๋ก ๊ทธ๋ฅ ๋๊ธด ์ข ๋ฐ๋ฐํด์ ์ฃผ์์ ์ด์ง ๋ฌ์๋ดค์ต๋๋ค! ๐ |
@@ -0,0 +1,91 @@
+package christmas.view;
+
+import christmas.dto.BenefitDTO;
+import christmas.dto.OrderDTO;
+
+import java.util.List;
+
+public class OutputView {
+ private void printMessage(ViewMessage message) {
+ System.out.println(message.getMessage());
+ }
+
+ private void printFormat(ViewMessage... | Java | ์ข์ ์ง์ ๊ฐ์ฌํฉ๋๋ค! `lineSeperator()`์ ๋ํด์ ๊ณต๋ถํด๋ด์ผ๊ฒ ๋ค์! ๐ |
@@ -0,0 +1,94 @@
+package christmas.domain;
+
+import christmas.config.Constant;
+import christmas.dto.OrderDTO;
+import christmas.config.ErrorMessage;
+import christmas.config.MenuType;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Bill implements CheckEventDate {
+ private final List<Order... | Java | ๊ทธ๋ ๊ฒ๋ ํ ์ ์๊ฒ ๋ค์! ์์ `Orders`๋ผ๋ ํด๋์ค๋ฅผ ๋ง๋ค์ด ๋ฆฌ์คํธ๋ฅผ ๊ด๋ฆฌํ๋ ๋ฐฉ๋ฒ๋ ์ข์๋ณด์
๋๋ค!
๋ฆฌํฉํ ๋ง ํ ๋งํ ๋ถ๋ถ๋ค์ ์ง์ด์ฃผ์
์ ์ข์ต๋๋ค!! ๐ |
@@ -0,0 +1,456 @@
+# ์ด๋ฉ์ผ ๋ต์ฅ
+
+> ์ ๋ชฉ: 12์ ์ด๋ฒคํธ ๊ฐ๋ฐ ๋ณด๊ณ
+
+> ๋ณด๋ธ ์ฌ๋: ๊ฐ๋ฐํ <`dev@woowacourse.io`>
+>
+> ๋ฐ๋ ์ฌ๋: ๋น์ฆ๋์คํ <`biz@woowacourse.io`>
+
+์๋
ํ์ธ์. ๊ฐ๋ฐํ์
๋๋ค!
+
+12์ ์ด๋ฒคํธ ํ๋๋ ๊ฐ๋ฐ ์์ฒญ ์ฌํญ์ ์ ๋ฐ์ ๋ณด์์ต๋๋ค.
+์์ฒญํ์ ๋ด์ฉ๋ค์ ๋ชจ๋ ์ ์ฉํด๋ณด์๋๋ฐ์. ํน์ ๋๋ฝ๋ ๋ถ๋ถ์ด ์๋ค๋ฉด ๋ฐ๋ก ๋ง์ํด์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค.
+
+#### ๋ฐฉ๋ฌธ ๋ ์ง ์
๋ ฅ
+
+- ๋ฐฉ๋ฌธ ๋ ์ง๋ 1 ์ด์ 31 ์ดํ์ ์ซ์๋ก๋ง ์
๋ ฅ๋ฐ๊ฒ ํ์ต๋๋ค.
+- ๋จ, ์ฌ์ฉ์์ ๋ถ์ฃผ์๋ก ์
๋ ฅ... | Unknown | Readme.md ๋ฅผ ๊ผผ๊ผผํ ์ ์์ฑํ์ ๊ฒ ๊ฐ์์๐ |
@@ -0,0 +1,47 @@
+package christmas.config;
+
+import java.util.Arrays;
+
+public enum Menu {
+ SOUP("์์ก์ด์ํ", 6000, MenuType.APPETIZER),
+ TAPAS("ํํ์ค", 5500, MenuType.APPETIZER),
+ SALAD("์์ ์๋ฌ๋", 8000, MenuType.APPETIZER),
+ STEAK("ํฐ๋ณธ์คํ
์ดํฌ", 55000, MenuType.MAIN),
+ BARBECUE("๋ฐ๋นํ๋ฆฝ", 54000, MenuType.MAIN),... | Java | ์ ๋ ๊ฐ์ ๋ฐฉ์์ผ๋ก ๊ตฌํํ๋๋ฐ
Menu์ ํ์ฅ์ฑ์ ์๊ฐํด์ ์ฌ๋ฌ๊ฐ์ง ์นดํ
๊ณ ๋ฆฌ์ ํฌํจ๋ ์๋ ์๋ ์ ์ ์๊ฐํ์ฌ
์นดํ
๊ณ ๋ฆฌ๋ ๋ฐ๋ก ๋นผ๋๊ฒ ์ข๋ค๋ ์๊ฒฌ์ ๋ดค์ต๋๋ค!
์ฟ ํค๋์ ์ด๋ป๊ฒ ์๊ฐํ์๋์? |
@@ -0,0 +1,18 @@
+package christmas.util;
+
+import java.util.function.Consumer;
+
+public class RetryExecutor {
+ private RetryExecutor() {
+ // ์ธ์คํด์ค ์์ฑ ๋ฐฉ์ง
+ }
+
+ public static void execute(Runnable action, Consumer<IllegalArgumentException> onError) {
+ try {
+ action.run();
+ ... | Java | Retry๋ฅผ ์ ๋ Controller์์ while๋ฌธ์ผ๋ก ํ์ฌ ์ง์ ๋ถํ ๊ฒ์ด ๊ณ ๋ฏผ์ด์๋๋ฐ
์ด๋ฐ ๋ฐฉ๋ฒ์ด ์์๋ค์! ๋ฐฐ์ ๊ฐ๋๋ค!! |
@@ -0,0 +1,91 @@
+package christmas.view;
+
+import christmas.dto.BenefitDTO;
+import christmas.dto.OrderDTO;
+
+import java.util.List;
+
+public class OutputView {
+ private void printMessage(ViewMessage message) {
+ System.out.println(message.getMessage());
+ }
+
+ private void printFormat(ViewMessage... | Java | ์ ๋ ์์ฃผ ์ฌ์ฉ๋๋ newLine()์ static์ผ๋ก ์ ์ธํ๋ฉด ์ข์ ๊ฒ ๊ฐ๋ค๊ณ ๋ง์๋๋ฆฌ๋ ค ํ๋๋ฐ
lineSeperator() ๋ผ๋๊ฒ ์์๊ตฐ์! ์ ๋ ๋ฐฐ์๊ฐ๊ฒ ์ต๋๋ค๐ |
@@ -0,0 +1,12 @@
+package christmas.config;
+
+public class Constant {
+ public static final int INIT_VALUE = 0;
+ public static final int FILTER_CONDITION = 0;
+ public static final int MIN_ORDER = 1;
+ public static final int MAX_ORDER = 20;
+
+ private Constant() {
+ // ์ธ์คํด์ค ์์ฑ ๋ฐฉ์ง
+ }
+} | Java | ๊ฐ์ธ์ ์ผ๋ก Constant ํด๋์ค์ ์์๋ค์ ๋ชจ์๋ฃ๋ ๊ฒ ๋ณด๋ค๋
๊ฐ ํด๋์ค์ ํ์ํ Constant ํด๋์ค๋ฅผ ๊ฐ๊ฐ ๋ง๋ค์ด์ ๋ง๋๋ ๊ฒ์ด ์๋ฏธ๋ฅผ ๋ ๋ช
ํํํ๊ณ ์์๋ณด๊ธฐ ์ฌ์ด ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,145 @@
+package christmas.domain;
+
+import christmas.dto.OrderDTO;
+import christmas.config.ErrorMessage;
+import christmas.config.MenuType;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.pro... | Java | ๋์ ํ์ธ ๋ณด๋ค๋ ์๋๋ฆฌ์ค๋ฅผ ์ ์ด์ฃผ๋ฉด ์ข์ ๊ฒ ๊ฐ์์
ํํ์ค 2๊ฐ, ํฐ๋ณธ์คํ
์ดํฌ 1๊ฐ, ์ ๋ก์ฝ๋ผ 2๊ฐ์ ํ ํ ์ฃผ๋ฌธ ๊ธ์ก 72000์์ ๋ฐํํ๋ค . ์ฝ๊ฐ ์ด๋ฐ์์ผ๋ก? |
@@ -0,0 +1,456 @@
+# ์ด๋ฉ์ผ ๋ต์ฅ
+
+> ์ ๋ชฉ: 12์ ์ด๋ฒคํธ ๊ฐ๋ฐ ๋ณด๊ณ
+
+> ๋ณด๋ธ ์ฌ๋: ๊ฐ๋ฐํ <`dev@woowacourse.io`>
+>
+> ๋ฐ๋ ์ฌ๋: ๋น์ฆ๋์คํ <`biz@woowacourse.io`>
+
+์๋
ํ์ธ์. ๊ฐ๋ฐํ์
๋๋ค!
+
+12์ ์ด๋ฒคํธ ํ๋๋ ๊ฐ๋ฐ ์์ฒญ ์ฌํญ์ ์ ๋ฐ์ ๋ณด์์ต๋๋ค.
+์์ฒญํ์ ๋ด์ฉ๋ค์ ๋ชจ๋ ์ ์ฉํด๋ณด์๋๋ฐ์. ํน์ ๋๋ฝ๋ ๋ถ๋ถ์ด ์๋ค๋ฉด ๋ฐ๋ก ๋ง์ํด์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค.
+
+#### ๋ฐฉ๋ฌธ ๋ ์ง ์
๋ ฅ
+
+- ๋ฐฉ๋ฌธ ๋ ์ง๋ 1 ์ด์ 31 ์ดํ์ ์ซ์๋ก๋ง ์
๋ ฅ๋ฐ๊ฒ ํ์ต๋๋ค.
+- ๋จ, ์ฌ์ฉ์์ ๋ถ์ฃผ์๋ก ์
๋ ฅ... | Unknown | ํด๋์ค๋ณ๋ก ์์ธ์ฌํญ ์์๋ ๊ธฐ๋ฅ์ ๊ผผ๊ผผํ ์์ฑํด์ ์ข์์ต๋๋ค! ํ๋ก๊ทธ๋จ์ ์กฐ๊ธ ์์ฝํด์ ์ ๋ฆฌํ ์ ๋ณด๋ ์์ผ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,12 @@
+package christmas.config;
+
+public class Constant {
+ public static final int INIT_VALUE = 0;
+ public static final int FILTER_CONDITION = 0;
+ public static final int MIN_ORDER = 1;
+ public static final int MAX_ORDER = 20;
+
+ private Constant() {
+ // ์ธ์คํด์ค ์์ฑ ๋ฐฉ์ง
+ }
+} | Java | ์ฃผ๋ฌธ ์๋์ ๋ํ ์์๋ค์ ์ ์ฅํ์
จ๋๋ฐ, ํด๋์ค๋ช
์ด Constant์ฌ์ init value ๋ filter condition ์์๋ช
์ ์๋ฏธ๊ฐ ์ข ๋ช
ํํ์ง ์์ ๊ฒ ๊ฐ์ต๋๋ค. ํ์ธ์ด ์ฝ๊ธฐ์ ์ฉ๋๊ฐ ๋ช
ํํ์ง ์์๊ฒ ๊ฐ์ต๋๋ค!
ํด๋์ค๋ช
์ OrderConstatns ์ ๊ฐ์ด ํ๋ฉด ์ข์๊ฒ ๊ฐ๋ค์.
์ต๋ ์ฃผ๋ฌธ ๊ฐฏ์๋ฅผ ์ธ์ ๋ ์ ์ฑ
๋ณ๊ฒฝ์ ๋ฐ๋ผ ๋ฐ๊พธ์๋ ค๊ณ ๋นผ๋ ๊ฒ์ด๋ผ๋ฉด ํจํค์ง ์์น๋ฅผ ๊ณ ๋ คํด๋ณด๋ ๊ฒ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,22 @@
+package christmas.config;
+
+public enum ErrorMessage {
+ WRONG_DATE("์ ํจํ์ง ์์ ๋ ์ง์
๋๋ค."),
+ WRONG_ORDER("์ ํจํ์ง ์์ ์ฃผ๋ฌธ์
๋๋ค."),
+ OVER_MAX_ORDER("๋ฉ๋ด๋ ํ ๋ฒ์ ์ต๋ 20๊ฐ๊น์ง๋ง ์ฃผ๋ฌธํ ์ ์์ต๋๋ค."),
+ ONLY_DRINK_ORDER("์๋ฃ๋ง ์ฃผ๋ฌธํ ์ ์์ต๋๋ค.");
+
+ private static final String PREFIX = "[ERROR]";
+ private static fin... | Java | ์ ๋ `class`๋ก ๊ตฌํํ๋๋ฐ ๋ค๋ฅธ ๋ถ๋ค ๋ณด๊ณ `enum`์ผ๋ก ๊ตฌํํด๋ณด๋ ค๊ตฌ์! ์ด๊ฑฐํ์ผ๋ก ๊ตฌํํ์ ๋๋ง์ ์ฅ์ ์ด ์๋ ๊ฒ ๊ฐ์ต๋๋ค! "์๋ฌ ๋ชจ์์ง์์ ์ด๋ฐ ์๋ฌ๋ฅผ ๊ฐ์ ธ์ค๋ ๊ตฌ๋~" ๋ผ๊ณ ์ฝ๊ธฐ ๋ ์ข์ ๊ฒ ๊ฐ์์ |
@@ -0,0 +1,47 @@
+package christmas.config;
+
+import java.util.Arrays;
+
+public enum Menu {
+ SOUP("์์ก์ด์ํ", 6000, MenuType.APPETIZER),
+ TAPAS("ํํ์ค", 5500, MenuType.APPETIZER),
+ SALAD("์์ ์๋ฌ๋", 8000, MenuType.APPETIZER),
+ STEAK("ํฐ๋ณธ์คํ
์ดํฌ", 55000, MenuType.MAIN),
+ BARBECUE("๋ฐ๋นํ๋ฆฝ", 54000, MenuType.MAIN),... | Java | ```suggestion
SOUP("์์ก์ด์ํ", 6_000, MenuType.APPETIZER),
```
๋ณ๊ฑฐ ์๋์ง๋ง ๊ฐ๊ฒฉ์ 3์๋ฆฌ ์ซ์ ๋ง๋ค '-' ์ธ๋๋ฐ ๋ฃ์ด์ฃผ์๋ฉด ๊ฐ๋
์ฑ์ ์ข์๊ฒ๊ฐ์ต๋๋ค. ์ค์๋ ์ค์ฌ์ฃผ๊ณ ์ |
@@ -0,0 +1,47 @@
+package christmas.config;
+
+import java.util.Arrays;
+
+public enum Menu {
+ SOUP("์์ก์ด์ํ", 6000, MenuType.APPETIZER),
+ TAPAS("ํํ์ค", 5500, MenuType.APPETIZER),
+ SALAD("์์ ์๋ฌ๋", 8000, MenuType.APPETIZER),
+ STEAK("ํฐ๋ณธ์คํ
์ดํฌ", 55000, MenuType.MAIN),
+ BARBECUE("๋ฐ๋นํ๋ฆฝ", 54000, MenuType.MAIN),... | Java | ```suggestion
public static Menu getMenuBy(String menuName) {
```
์ ๋ง ๊ฐ์ ์คํ์ผ์ด ๋ฌ๋ผ์ ์ ๊ฐ ๊ผญ ์ ๋ต์ ์๋์ง๋ง ๋ฉ์๋๋ช
์ถ์ฒ๋๋ฆฝ๋๋ค! |
@@ -0,0 +1,5 @@
+package christmas.config;
+
+public enum MenuType {
+ APPETIZER, MAIN, DESSERT, DRINK
+} | Java | ์นดํ
๊ณ ๋ฆฌ ๋ฐ๋ก ์ด๊ฑฐํด์ ๊ตฌ๋ถํ์ ๊ฒ ๋์ค์ ๋ฌธ์๋ก ๋น๊ตํ๋ ๊ฒ๋ณด๋ค ์์ ์ฑ ์๊ฒ ๊ตฌํํ์ ๊ฒ ๊ฐ์์ |
@@ -0,0 +1,26 @@
+package christmas.domain;
+
+import java.util.Arrays;
+
+public enum Badge {
+ SANTA("์ฐํ", 20000),
+ TREE("ํธ๋ฆฌ", 10000),
+ STAR("๋ณ", 5000),
+ NOTHING("์์", 0);
+
+ private final String badgeName;
+ private final int threshold;
+
+ Badge(String badgeName, int threshold) {
+ t... | Java | ์ ๋ ์ด๋ ๊ฒ ๊ตฌํํ๋๋ฐ ๊ณ ๋ฏผํ๋ค๋ณด๋
๋ฑ์ง๊ฐ ๊ฐ์ง ๊ฐ๋
์ด `๊ฐ๊ฒฉ` ์ธ์ง `๋ฒ์`์ธ์ง ์ทจํฅ ์ฐจ์ด๋ผ๊ณ ์๊ฐํ๋๋ฐ ์ ๋ `๋ฒ์`๊ฐ ์กฐ๊ธ๋ ๋ฑ์ง๊ฐ ๊ฐ์ง ๊ฐ๋
์ด๋ผ๊ณ ์๊ฐ์ด ๋ค๋๋ผ๊ตฌ์ ๊ทธ๋์ ์์ ๊ธฐ์ค ๊ฐ๊ฒฉ๋์ ๋ฒ์๋ฅผ ๋ฃ์ด๋ณด๋ ๊ณ ๋ฏผ๋ ํด๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,81 @@
+package christmas.domain;
+
+import christmas.config.ErrorMessage;
+
+import java.util.Arrays;
+
+public class Date implements CheckEventDate {
+ private static final int WEEK_NUM = 7;
+ private static final int WEEK_DIFF = 4;
+ private static final int FIRST_DAY = 1;
+ private static fina... | Java | ์ด ํด๋์ค ๊ต์ฅํ ์ข์ ๊ฒ ๊ฐ์์ Date๋ผ๋ ๊ฐ๋
๋ ์ ๋ด๊ฒจ์๊ณ ํฌ๋ฆฌ์ค๋ง์ค๋ ์์ ์์ผ์ ๋ค๋ฅธ ๊ณณ์์ ๋ฐ์์ค๋ ๋ฐฉ์์ผ๋ก ๋ฐ๊พผ๋ค๋ฉด ํด๋น ์ ๋ณด๋ง ๊ฐ์๋ผ์ฐ๋ฉด ๊ณ์ ๋์๋๋ ํด๋์ค ๊ฐ์์.
java.time ์ด๋ผ๋ ์๋ฐ ํจํค์ง๋ฅผ ํ๋ ์ถ์ฒํด๋๋ฆด๊ฒ์
```
import java.time.LocalDate;
import java.time.DayOfWeek;
import java.time.format.TextStyle;
import java.util.Locale;
public class Main {
public static void main(Stri... |
@@ -0,0 +1,75 @@
+package christmas.domain;
+
+import christmas.config.Menu;
+import christmas.config.MenuType;
+
+import java.util.function.Function;
+import java.util.function.Predicate;
+
+public enum Event {
+ CHRISTMAS(
+ "ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด ํ ์ธ",
+ true,
+ Bill::isNotPassedChristmas,
+ ... | Java | ์ค ํ ์ธ์ด ์ ์ฉ ๋์๋์ง ๋ถ๋ฆฐ๊ฐ์ ๋ฃ์ด๋์ ๊ฒ์ด ๋งค์ฐ ์ข์๋ณด์
๋๋ค! ๋ฐฐ์๊ฐ๋๋ค.
ํด๋น ๋ด์ฉ์ ๋ฑ์ง์๋ ์ ์ฉํ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,52 @@
+package christmas.util;
+
+import christmas.dto.OrderDTO;
+import christmas.config.ErrorMessage;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+public class OrderParser {
+ private static final String SEQUENCE_DELIMITER = ",";
+ private static final St... | Java | ```suggestion
private static final Pattern ORDER_PATTERN = Pattern.compile("[^-]+-[0-9]+"); // ์ปดํ์ผ๋ ํจํด
``` |
@@ -0,0 +1,110 @@
+package christmas.controller;
+
+import christmas.domain.*;
+import christmas.utils.EventSettings;
+import christmas.parser.EventDetailsParser;
+import christmas.view.EventView;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+public class ChristmasEventController implements EventController ... | Java | 3์ฃผ ์ฐจ ์น ๋ฐฑ์๋ ๊ณตํต ํผ๋๋ฐฑ์ผ๋ก ํ๋(์ธ์คํด์ค ๋ณ์)์ ์๋ฅผ ์ค์ด๊ธฐ ์ํด ๋
ธ๋ ฅํ๋ค๋ผ๋ ํญ๋ชฉ์ด ์์๋๋ฐ์ ์ค๋ณต๋๋ ํญ๋ชฉ๋ค์ ํ๋์ result๋ก ๋ฌถ์ด์ ํ๋ฒ ๊ด๋ฆฌ๋ฅผ ํด๋ณด๋ ๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,110 @@
+package christmas.controller;
+
+import christmas.domain.*;
+import christmas.utils.EventSettings;
+import christmas.parser.EventDetailsParser;
+import christmas.view.EventView;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+public class ChristmasEventController implements EventController ... | Java | ๊ฐ์ธ์ ์ธ ์๊ฐ์ผ๋ก๋ ์ปจํธ๋กค๋ฌ์์ ๋๋ฉ์ธ์์ ํด์ผ ํ ์ญํ ๋ค์ ๋ง์ด ๊ฐ์ง๊ณ ์๋ ๊ฒ ๊ฐ์์ ์ด๋ฐ ๊ณ์ฐ์ด๋ ํ ์ธ์ ๋ํ ๋ด์ฉ๋ค์ ๋ฐ๋ก ์ด ์ญํ ์ ๋ด๋นํ๋ ๊ฐ์ฒด๋ฅผ ๋ง๋ค์ด์ ๊ทธ๊ณณ์์ ์ค์ค๋ก ์ผ์ ํ ์ ์๋๋ก ๊ฐ์ฒด์งํฅ์ ์ผ๋ก ์ค๊ณํด ๋ณด๋ ๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,110 @@
+package christmas.controller;
+
+import christmas.domain.*;
+import christmas.utils.EventSettings;
+import christmas.parser.EventDetailsParser;
+import christmas.view.EventView;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+public class ChristmasEventController implements EventController ... | Java | ํ๋์ ํจ์์์ ๋ค์ํ ์ผ์ ํ๊ณ ์๋ ๊ฒ ๊ฐ์๋ฐ ๊ธฐ๋ฅ์ ๋ถ๋ฆฌํด ๋ณด๋ ๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,26 @@
+package christmas.controller;
+
+import christmas.domain.Bill;
+import christmas.domain.Order;
+import christmas.domain.ReservationDay;
+
+import java.math.BigDecimal;
+
+public interface EventController {
+
+ void applyEvent(ReservationDay day, Order order, Bill bill);
+
+ void showEventDiscoun... | Java | EventController๋ฅผ interface๋ก ๋ง๋ค์ด์ ์ด๋ฒคํธ์ ๋ํ ๋ก์ง์ ๊ด๋ฆฌํ๋ ๊ฒ๋ณด๋ค ์ด๋ฒคํธ ๊ด๋ จ ๋๋ฉ์ธ์ interface๋ก ๋ง๋ค์ด์ ์ฌ์ฉํด ๋ณด๋ ๊ฑด ์ด๋จ๊น์? ๊ฐ์ฒด์งํฅ์ ๋ค๋ฃฌ ์ค๋ธ์ ํธ ์์ ์์ ๋น์ทํ ๋ด์ฉ์ด ์์ด์ ๋งํฌ ๋จ๊น๋๋ค. https://github.com/eternity-oop/object/tree/master/chapter13/src/main/java/org/eternity/movie/step02 |
@@ -0,0 +1,32 @@
+package christmas.domain;
+
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+import java.math.BigDecimal;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class BadgeTest {
+
+ @Test
+ @DisplayName("์ฐํ_๋ฑ์ง_๊ฒฝ๊ณ๊ฐ_ํ
์คํธ")
+ void getBadge_SantaBadgeAmount_Shoul... | Java | import static org.junit.jupiter.api.Assertions.*; ๋ฅผ ์ฌ์ฉํ๊ธฐ๋ณด๋ค ๋ ๊ฐํธํ๊ฒ ํ
์คํธ๋ฅผ ํ ์ ์๋ import static org.junit.jupiter.api.Assertions.*;๋ฅผ ์ฌ์ฉํด ๋ณด๋ ๊ฑด ์ด๋จ๊น์?
https://jwkim96.tistory.com/168 |
@@ -0,0 +1,36 @@
+package christmas.domain;
+
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+import java.math.BigDecimal;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class BillTest {
+ Order testOrder = new Order();
+
+ @Test
+ @DisplayName("์ ์ฒด_๊ฐ๊ฒฉ_๊ณ์ฐ_ํ
์คํธ")
... | Java | given when then ํจํด์ ์ฌ์ฉํด์ ํ
์คํธ์ฝ๋๋ฅผ ๋๋ ๋ณด๋ ๊ฑด ์ด๋จ๊น์?
https://brunch.co.kr/@springboot/292 |
@@ -0,0 +1,89 @@
+package christmas.domain;
+
+import christmas.utils.ErrorMessage;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class OrderTest {
+ String validInput = "ํฐ๋ณธ์คํ
์ด... | Java | ๋ฐ๋ณต๋๋ Order order = new Order(); ๋ @BeforeAll void setUp()์ ํ์ฉํ์ฌ์ ๋ฏธ๋ฆฌ ์์ฑํด ์ฃผ๋ ๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,110 @@
+package christmas.controller;
+
+import christmas.domain.*;
+import christmas.utils.EventSettings;
+import christmas.parser.EventDetailsParser;
+import christmas.view.EventView;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+public class ChristmasEventController implements EventController ... | Java | ํน์ ๋ฉ์๋์์๋ง ์ฌ์ฉ๋๋ ํ๋๋ ๋ก์ปฌํํ๊ณ ๋๋จธ์ง ๊ฐ์ฒดํํ์ฌ ํ๋ ์๋ฅผ ์ค์ฌ๋ณด๋ ๊ฑด ์ด๋จ๊น์?
์ถ๊ฐ๋ก `final` ํค์๋๋ฅผ ์๋ตํ์ ์ด์ ๊ฐ ์์๊น์? |
@@ -0,0 +1,69 @@
+package christmas.controller;
+
+import christmas.domain.Bill;
+import christmas.domain.Order;
+import christmas.domain.ReservationDay;
+import christmas.view.InputView;
+import christmas.view.OutputView;
+
+public class PlannerController {
+ private final Order order;
+ private final Reservatio... | Java | ์์ธ ๋ฉ์์ง ์ถ๋ ฅ๋ `OutputView` ์์ ์ฒ๋ฆฌํ๋๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,69 @@
+package christmas.controller;
+
+import christmas.domain.Bill;
+import christmas.domain.Order;
+import christmas.domain.ReservationDay;
+import christmas.view.InputView;
+import christmas.view.OutputView;
+
+public class PlannerController {
+ private final Order order;
+ private final Reservatio... | Java | ํ๋๊ฐ ์์ฑ์๊ฐ ์๋ ๋ค๋ฅธ ๋ฉ์๋์์ ์ด๊ธฐํ๋๋๊ฒ ์ด์ํ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,35 @@
+package christmas.domain;
+
+import java.math.BigDecimal;
+
+public enum Badge {
+ SANTA_BADGE("์ฐํ", new BigDecimal(20000)),
+ TREE_BADGE("ํธ๋ฆฌ", new BigDecimal(10000)),
+ STAR_BADGE("๋ณ", new BigDecimal(5000));
+
+ private final String name;
+ private final BigDecimal standardAmount;
+
+ ... | Java | ์ด๋ฆ์ด `null`์ด ๋๋ ๊ฒฝ์ฐ๊ฐ ์์๊น์? |
@@ -0,0 +1,110 @@
+package christmas.controller;
+
+import christmas.domain.*;
+import christmas.utils.EventSettings;
+import christmas.parser.EventDetailsParser;
+import christmas.view.EventView;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+public class ChristmasEventController implements EventController ... | Java | `BigDecimal` ์ ๊ฒฝ์ฐ ์ผ๋ถ ๊ฐ์ ์บ์ฑํ๊ณ ์์ด ์์ฑ์ ๋์ `valueOf()` ๋ฉ์๋๋ฅผ ํตํด ๊ฐ์ฒด๋ฅผ ์ป๋๊ฒ ๋ ํจ์จ์ ์
๋๋ค! |
@@ -0,0 +1,35 @@
+package christmas.domain;
+
+import java.math.BigDecimal;
+
+public enum Badge {
+ SANTA_BADGE("์ฐํ", new BigDecimal(20000)),
+ TREE_BADGE("ํธ๋ฆฌ", new BigDecimal(10000)),
+ STAR_BADGE("๋ณ", new BigDecimal(5000));
+
+ private final String name;
+ private final BigDecimal standardAmount;
+
+ ... | Java | `null` ๋ฐํ์ด ์ํํ ๊ฒ ๊ฐ์์! `NONE` ๊ณผ ๊ฐ์ ์ธ์คํด์ค๋ฅผ ์ถ๊ฐํ์ฌ ์ด๋ฅผ ๋ฐํํ๋๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,32 @@
+package christmas.domain;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+public class Bill {
+ private final Map<Menu, Integer> orderDetails;
+
+ private BigDecimal totalPrice = new BigDecimal(0);
+
+ public Bill(Order order) {
+ this.orderDetails = order.getOrderDetails();
... | Java | ๋ฉ๋ด ์
๋ ฅ ์ ์ด๋ฆ, ์๋ ์ธ์ ๋ค๋ฅธ ๊ฐ์ด ์ถ๊ฐ๋๋๊ฑธ ๊ฐ์ํ์ฌ `Map<K, V>` ๋์ ๋ณ๋์ ํด๋์ค ์ฌ์ฉ์ ์ด๋จ๊น์? |
@@ -0,0 +1,29 @@
+package christmas.domain;
+
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public class DecemberCalendar {
+ private final List<Integer> weekdays = Stream.of(3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 31)
+ ... | Java | `Arrays.asList()` ๋์ Stream์ ์ฌ์ฉํ์ ์ด์ ๊ฐ ์์๊น์? |
@@ -0,0 +1,62 @@
+package christmas.domain;
+
+import christmas.utils.ErrorMessage;
+import christmas.parser.Parser;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static christmas.domain.validator.OrderValidator.*;
+
+public class Order {
+ private final Map<Menu, Integer> ord... | Java | `int`์ ๊ฒฝ์ฐ ํ๋์์ ๊ฐ์ ๋์
ํ์ง ์์๋ ๊ฐ์ฒด ์์ฑ์ 0์ผ๋ก ์ด๊ธฐํ ๋ฉ๋๋ค! |
@@ -0,0 +1,62 @@
+package christmas.domain;
+
+import christmas.utils.ErrorMessage;
+import christmas.parser.Parser;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static christmas.domain.validator.OrderValidator.*;
+
+public class Order {
+ private final Map<Menu, Integer> ord... | Java | ๋๋ฉ์ธ์ด View์ ์์กดํ๋ ๊ฒ ๊ฐ์ต๋๋ค! `OutputView`์์ `Order`์ ๋ํ ๊ฐ์ ๊ฐ์ ธ์จ ํ ์ถ๋ ฅํ๋๊ฑด ์ด๋จ๊น์? |
@@ -0,0 +1,18 @@
+package com.codesquad.baseball09.controller;
+
+import java.text.SimpleDateFormat;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMap... | Java | Spring Boot Actuator ์ฌ์ฉ ๊ฒํ ํด๋ด
๋๋ค.
https://supawer0728.github.io/2018/05/12/spring-actuator/ |
@@ -0,0 +1,99 @@
+package com.codesquad.baseball09.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+public class BattingLog {
+
+ private Long id;
+ private Long gameId;
+ private Long playerId;
+ private int inning;
+ private Status status;... | Java | ์ ์ ํ builder ์ฌ์ฉ ์ข๋ค์. ๐ |
@@ -0,0 +1,282 @@
+package com.codesquad.baseball09.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.List;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public class Board {
+
+ private Long gameId;
+ private int inn... | Java | ์ธ์๊ฐ ๋ง์ด ํ์ํ ์์ฑ์๋ฅผ `private` ํ๊ฒ ๊ฐ๋ฆฌ๋ ๊ตฌํ ์์ฃผ ์ข์ต๋๋ค! ๐ฏ ๐ฅ |
@@ -0,0 +1,282 @@
+package com.codesquad.baseball09.model;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.List;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public class Board {
+
+ private Long gameId;
+ private int inn... | Java | `else` ์์ด ๊ตฌํํด๋ณผ ์ ์์ง ์์์๊น์? |
@@ -0,0 +1,196 @@
+package com.codesquad.baseball09.model;
+
+import static com.codesquad.baseball09.model.Status.BALL;
+import static com.codesquad.baseball09.model.Status.HIT;
+import static com.codesquad.baseball09.model.Status.OUT;
+import static com.codesquad.baseball09.model.Status.STRIKE;
+
+import com.fasterxml... | Java | ๋ค ๊ฐ์ ํ์์ ๋ํด ๊ฒฐ๊ณผ๋ฅผ ๋ฐ์ํด์ผ ํ๋ค ๋ณด๋, ๋ค ๊ฐ์ `case` ๋ฅผ ๊ฐ๋ `switch` ๋ฌธ๊ณผ ๊ฐ์ ๊ตฌํ์ด ๋์ค๊ฒ ๋์์ต๋๋ค.
์ด๋ฅผ ์ด๋ป๊ฒ ๊ฐ์ฒด์งํฅ์ ์ผ๋ก, ๊น๋ํ๊ฒ ํ ์ ์์๊น์.
๋จ์ํ ์๊ฐํด๋ณด๊ธฐ๋ก๋ `InningCount` ๋ผ๋ ๊ฐ์ฒด๊ฐ `BallCount` ๊ฐ์ฒด๋ฅผ ๋ค์ ๊ฐ๊ณ ์์ผ๋ฉด์, ์์ ์นด์ดํธ์ ๋ณผ ์นด์ดํธ๋ฅผ ๊ด๋ฆฌํ๋ ๋ฐฉ์์ด ๋ ์ค๋ฆ
๋๋ค.
๊ฐ ํ์์ ํด๋นํ๋ `enum` ์ ๊ฐ์ฒด์ ๋๊ธฐ๋ฉด ๊ทธ ๊ฐ์ฒด๊ฐ ๋๋จธ์ง ์ผ์ ์ฒ๋ฆฌํ๊ฒ ๋๋ ๊ฑฐ์ฃ .
ํ ๋ฒ ์๊ฐํด๋ณด์๊ณ ๋๋๊ธ๋ก ๊ณ์ ๊ตฌํ์ ๋ํด ์๊ฒฌ ๋๋ ๋ณด๋ฉด ์ฌ๋ฐ๊ฒ ๋ค์. |
@@ -0,0 +1,18 @@
+package com.codesquad.baseball09.controller;
+
+import java.text.SimpleDateFormat;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMap... | Java | ๋ค์ ํ๋ก์ ํธ์ ํ๋ฒ ์ ์ฉํด๋ณด๊ฒ ์ต๋๋ค |
@@ -0,0 +1,196 @@
+package com.codesquad.baseball09.model;
+
+import static com.codesquad.baseball09.model.Status.BALL;
+import static com.codesquad.baseball09.model.Status.HIT;
+import static com.codesquad.baseball09.model.Status.OUT;
+import static com.codesquad.baseball09.model.Status.STRIKE;
+
+import com.fasterxml... | Java | @wheejuni ๋ฆ๊ฒ ๋ตํด๋๋ ค ์ฃ์กํฉ๋๋ค..
ํ์ฌ `InningStatus` ๊ฐ์ฒด๋ inning, strike, ball, out, hit๋ฅผ primitive ํ ๊ฐ์ผ๋ก ๋ณด๊ดํ๊ณ ์์ต๋๋ค.
๋ง์ํ์ ๋ฐฉ๋ฒ์ ball, out์ ๊ด๋ฆฌํ๋ `BallCount`๋ผ๋ ๊ฐ์ฒด๋ฅผ ๋ง๋ค์ด์ ํด๋น ํ์์ ๋ํด ์ด ๊ฐ์ฒด์์ ์ฒ๋ฆฌํ๋๋ก ๋ง๋๋ ๋ฐฉ๋ฒ์ด๋ผ ์ดํด๋ฉ๋๋ค.
๊ทธ๋ฆฌ๊ณ ๋๋จธ์ง ์ผ์ ์ฒ๋ฆฌํ๋ ๋ถ๋ถ์, `4ball`์ผ ๊ฒฝ์ฐ, `1 out`์ด ์ฌ๋ผ๊ฐ๋๋ก ํน์ `3 out` ์ ๊ณต์๊ต๋๋ฅผ ํ ์ ์๋๋ก ์๋ ค์ฃผ๋ ์ญํ ์ด๋ผ ์๊ฐ๋ฉ๋๋ค. ์ ๊ฐ ์ ๋๋ก ์ดํดํ ๊ฒ์ด ๋ง์๊น์? |
@@ -0,0 +1,196 @@
+package com.codesquad.baseball09.model;
+
+import static com.codesquad.baseball09.model.Status.BALL;
+import static com.codesquad.baseball09.model.Status.HIT;
+import static com.codesquad.baseball09.model.Status.OUT;
+import static com.codesquad.baseball09.model.Status.STRIKE;
+
+import com.fasterxml... | Java | strike, ball, out, hit ๊ฐ๊ฐ ์ญํ ์ด ์๋ ๋งํผ , ๋ชจ๋ ๊ฐ์ฒด๋ก ๋ง๋๋ ๊ฒ์ด ์ข ๋ ๊น๋ํ ๋ฐฉ๋ฒ์ผ๊น์?
์ด๋ ๊ฒ ์ด๋ค ๋ณํ์ ๋ฐ๋ผ ์ํฅ ๋ฐ๋ ๊ฒ๋ค์ด ๋ง์ ๋, ์ด๋ป๊ฒ ๊ทธ๋ฌํ ์ํธ์์ฉ์ ๊ตฌํํ ์ ์์์ง, ๋๊ฐํฉ๋๋คใ
ใ
|
@@ -0,0 +1,27 @@
+package racingcar.dao;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
+import racingcar.dao.entity.GameEntity;
+
+public class InsertGameDao {
+
+ private final SimpleJdbcInsert i... | Java | ์ด๊ฑฐ ์ธ ์ ๋ ? |
@@ -1,3 +1,5 @@
+import {ReviewLikeButtonProps} from "@review-canvas/theme";
+
export type Shadow = 'NONE' | 'SMALL' | 'MEDIUM' | 'LARGE';
export type FocusAreaLayout = 'BEST_REVIEW_TOP' | 'BEST_REVIEW_BOTTOM' | 'BEST_REVIEW_LEFT' | 'BEST_REVIEW_RIGHT';
export type ReviewAreaLayout = 'REVIEW_TOP' | 'REVIEW_BOTTOM' |... | TypeScript | ์ ์ฒด์ ์ผ๋ก Prettier๊ฐ ์ ์ฉ์ด ์ ๋์ด ์๋ ๊ฒ ๊ฐ์๋ฐ Prettier ์ ์ฒด์ ์ผ๋ก ์ ์ฉํด ์ฃผ์ธ์! |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | svg๋ component๋ก ๋ถ๋ฆฌํด์ Importํด์ ์ฐ๋ ๊ฒ ์ด๋จ๊ฐ์?? ๋ค๋ฅธ ๊ณณ์์๋ ์ธ ์ ์๊ณ , ์ปดํฌ๋ํธ ์ฝ๋ ๋ด์์ ๊ฐ๋
์ฑ์ด ์ข์ง ์์ ๊ฒ ๊ฐ์์์! |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | ๋ถํ์ํ console์ ์ ์ธํด์ฃผ์ธ์! ์์ ์ ๋ฆฌ๋ทฐ์๋ ๋์๋ผ์ ๊ฐ์ ๊ฒฝ์ฐ๋ ์คํ๋ ค alert์ผ๋ก ๋ณด์ฌ์ฃผ๋ ๊ฒ ๋ซ์ง ์์๊น ์ถ๋ค์ |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | ts ignore๋ ํน์ ์ ์ค์ ํด ๋์ผ์ ๊ฑธ๊น์?? |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | P3: interface ๊ฐ์ ๊ฒฝ์ฐ ๋ค๋ฅธ ๊ณณ์์๋ ์ฌ๋ฌ ๊ณณ์์ ์ฐ์ผ ์ ์๋๋ฐ, type ๋๋ ํ ๋ฆฌ ๋ฑ์ ๊ณตํต์ ์ธ model์ ์ ์ํด๋๊ณ extends ๋ฑ์ผ๋ก ๊ฐ์ ธ์์ ์ฐ๋ ๋ฐฉ์๋ ๊ณ ๋ คํด ๋ณผ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค. ReviewItem์ ์๋นํ ๋ง์ ๊ณณ์์ ์ฐ์ด๋ ์์๋ก ์๊ฐ๋์ ์ฐธ๊ณ ํ์๋ฉด ์ข์ ๊ฒ ๊ฐ์ ๋จ๊น๋๋ค! |
@@ -1,3 +1,5 @@
+import {ReviewLikeButtonProps} from "@review-canvas/theme";
+
export type Shadow = 'NONE' | 'SMALL' | 'MEDIUM' | 'LARGE';
export type FocusAreaLayout = 'BEST_REVIEW_TOP' | 'BEST_REVIEW_BOTTOM' | 'BEST_REVIEW_LEFT' | 'BEST_REVIEW_RIGHT';
export type ReviewAreaLayout = 'REVIEW_TOP' | 'REVIEW_BOTTOM' |... | TypeScript | Plugin ์ค์น๋ฅผ ํ๋ฉด ์๋ฃ์ธ ์ค ์์๋๋ฐ ์ค์ ์์ Manually๋ก ๋ฐ๊พธ์ด์ค์ผ ํ๊ตฐ์... ํ์ฌ Prettier๋ฅผ ํ์ฑํ ์ํ๋ก ๋ณ๊ฒฝํ์์ต๋๋ค. ์ ์ฒด ํ์ผ์ ์ ์ฉํ์ฌ ๋ค์ ์ปค๋ฐํ๊ฒ ์ต๋๋ค! |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | ํ์ธํ์์ต๋๋ค, Alert๋ก ๋ณ๊ฒฝํ๊ฒ ์ต๋๋ค, ๋์๋ผ์!์ ๊ฒฝ์ฐ์๋ ๋ฒํผ์ด ์ ๋๋ก ๋์ํ๋ ๊ฒ์ ํ์ธํ๊ธฐ ์ํด ์์๋ก ๋ฃ์ด๋๊ณ ๋์ค์ ๋์๋ผ์ API๊ฐ ๋ฐฑ์๋์์ ๊ตฌํ๋๋ฉด ๋ก์ง์ผ๋ก ๋์ฒดํ๊ฒ ์ต๋๋ค! |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | ํ์ธํ์์ต๋๋ค, Import๋ก ๋์ฒดํ๊ฒ ์ต๋๋ค! |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | ํ
์คํธ๋ฅผ ํ ๋ ReviewLikeButton์ด 'None'์ผ๋ก ๊ณ ์ ์ด๋ผ ํ๋์ฝ๋ฉ์ผ๋ก ReviewLikeButton์ ๋ฐ๊พธ๊ณ ์์์ต๋๋ค. ๊ทธ ๊ณผ์ ์์ ์กฐ๊ฑด๋ฌธ ๊ฒฝ๊ณ ๊ฐ ๋ฐ์ํ์ฌ ์ค์ ํด๋์๋๋ฐ ํ๋์ฝ๋ฉ๋ง ์ง์ฐ๊ณ ์ด๊ทธ๋
ธ์ด๋ฅผ ๋ชป ์ง์ ๋ค์... ์ง์์ ๋ฐ์ํ๊ฒ ์ต๋๋ค! |
@@ -9,50 +9,55 @@ import {
generateShadowCSS,
} from '@review-canvas/theme';
+// import ThumbUpIcon from '@/assets/icon/icon-thumb-up.svg';
import { Star } from '@/components/review/star.tsx';
import { useReviewItemStyle } from '@/contexts/style/review-item.ts';
import useMessageToShop from '@/hooks/use-messag... | Unknown | service/api-types/review.tsx์ ๊ณตํต ๋ชจ๋ธ๋ก ์ ์ธํ์ฌ export ๋ฐ import ํ์์ต๋๋ค! |
@@ -0,0 +1,97 @@
+package christmas.config;
+
+import christmas.controller.EventController;
+import christmas.exception.RetryHandler;
+import christmas.service.EventService;
+import christmas.service.MenuService;
+import christmas.validator.InputValidator;
+import christmas.view.input.ConsoleReader;
+import christmas.v... | Java | ์ ์ฒด์ ์ผ๋ก null ์ฒดํฌ๋ฅผ ํด์ฃผ์ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค! |
@@ -0,0 +1,30 @@
+package christmas.constants.event;
+
+public enum BadgeType {
+ NONE("์์", 0),
+ STAR("๋ณ", 5_000),
+ TREE("ํธ๋ฆฌ", 10_000),
+ SANTA("์ฐํ", 20_000);
+
+ private final String name;
+ private final int threshold;
+
+ BadgeType(String name, int threshold) {
+ this.name = name;
+ ... | Java | ๋ฐฐ์ง ์์์ NONE์ผ๋ก ๊ด๋ฆฌํ์ ๋ถ๋ถ๋ ์ข์ ์ ๋ต์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค :)
Optional์ ๊ณ ๋ คํด๋ณด์๋ ๊ฒ๋ ์ข์ ๊ฒ ๊ฐ์์! ์ด๋ฒ์ Optional์ ์ฒ์ ํ์ฉํด๋ดค๋๋ฐ์, **์์ ์๋ ์๋ค ๋ผ๋ ๋น์ฆ๋์ค ์๊ตฌ์ฌํญ**์ **์ฝ๋๋ก ๋ช
์**ํ ์ ์๋ ์ ์ด ์ ๋ง ํฐ ์ฅ์ ์ธ ๊ฒ ๊ฐ์ต๋๋ค :)
๋ง์ฝ Optional์ ๋์
ํ๋ค๋ฉด `from` ๋ฉ์๋๋ฅผ ์ด๋ ๊ฒ ๋ฆฌํฉํฐ๋งํด๋ณผ ์ ์์ ๊ฒ ๊ฐ์์!
```java
public static Optional<BadgeType> from(int benefitPrice) {
Optional<Badge> bad... |
@@ -0,0 +1,54 @@
+package christmas.constants.menu;
+
+import static christmas.constants.menu.MenuType.APPETIZER;
+import static christmas.constants.menu.MenuType.DESSERT;
+import static christmas.constants.menu.MenuType.DRINKS;
+import static christmas.constants.menu.MenuType.MAIN;
+import static christmas.exception.E... | Java | `์ด๋ฆ`์ ๋ํ `๋ฉ๋ด`๋ฅผ HashMap์ผ๋ก ์บ์ฑํด๋๋ ์ ๋ต๋ ์ถ์ฒ๋๋ฆฝ๋๋ค.
Enum์์ static ๋ธ๋ก์ ์ถ๊ฐํ ์ ์๋๋ฐ์, ์๋ฐ์์ผ๋ก ๊ตฌํํ ์ ์์ต๋๋ค!
```java
public enum Menu {
// ์ด๊ฑฐํ ์์๋ค ...
private static final Map<String, Menu> cachedMenu = new HashMap<>();
static {
for (Menu menu : values()) {
cachedMenu.put(menu.getName(), m... |
@@ -0,0 +1,98 @@
+package christmas.service;
+
+import static christmas.constants.event.EventRule.MAX_MENU_AMOUNT;
+import static christmas.constants.menu.MenuType.DRINKS;
+import static christmas.exception.ErrorCode.INVALID_MENU_ORDER;
+
+import christmas.constants.menu.Menu;
+import christmas.constants.menu.MenuType;... | Java | `MenuService` ์์ ์ฃผ๋ฌธ ์ ๋ณด๋ค์ ๋ด๊ณ ์๋๊ฒ ์ธ์๊น์ต๋๋ค!
์ด๊ฒ๋ ์ข์ ์ ๊ทผ ๋ฐฉ์์ธ ๊ฒ ๊ฐ์ง๋ง, `Map<Menu, Integer>`๊ฐ `์ฃผ๋ฌธ ์ ๋ณด` ๋ผ๋ ์ฌ์ค์ ์ถ์ ํ๊ธฐ ์ด๋ ค์ธ ์๋ ์์ ๊ฒ ๊ฐ์์!
`Order` Domain ํด๋์ค๋ฅผ ์์ฑํ๊ณ , validate ๊ฒ์ฆ ์ญํ ๋ ์์ํด์ฃผ๋ฉด MenuService ํด๋์ค๊ฐ ํ์ธต ์์์ง ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค.
์ฌ๊ธฐ์ Service Layer์ ํด๋์ค๊ฐ ์์์ง๋ค๋ ๊ฒ์ **Domain ๊ฐ์ฒด์๊ฒ ์์ฒญํ์ฌ ๊ฒฐ๊ณผ ๊ฐ์ ๋ฐํํ๋ ์ญํ **, **๋น์ฆ๋์ค ๋ก์ง ํ๋ฆ์ ๋ด๋นํ๋ ์ญํ **๋ก ์ถ์ ๋๋ค๋ ์๋ฏธ๋ผ๊ณ ์๊ฐํด์.... |
@@ -0,0 +1,32 @@
+package christmas.util;
+
+import static christmas.exception.ErrorCode.INVALID_DATE;
+import static christmas.exception.ErrorCode.INVALID_MENU_ORDER;
+
+import java.util.List;
+
+public class Parser {
+ public static int parseToDate(String input) {
+ try {
+ return Integer.parseIn... | Java | catch ํ ์ด๋ ํ Exception์ ๋ค๋ฅธ Exception์ผ๋ก ๋ํํ์ฌ ๋ค์ ๋์ ธ์ค ๋, catch ํ๋ Exception๋ ๋ฃ์ด์ ๋๊ฒจ์ฃผ๋ ๊ฒ์ ์ถ์ฒ๋๋ฆฝ๋๋ค.
```java
public static int parseToDate(String input) {
try {
return Integer.parseInt(input);
} catch (NumberFormatException e) {
throw new IllegalArgumentException(INVALID_DATE.get... |
@@ -0,0 +1,25 @@
+package christmas.constants.event;
+
+public enum EventRule {
+ EVENT_THRESHOLD(10_000),
+ PRESENT_THRESHOLD(120_000),
+ EVENT_START(1),
+ EVENT_END(31),
+ MAX_MENU_AMOUNT(20),
+ CHRISTMAS_EVENT_END(25),
+ CHRISTMAS_INIT_PRICE(1_000),
+ CHRISTMAS_EXTRA_DISCOUNT(100),
+ MENU_... | Java | ์ด๋ฒคํธ ๋ฃฐ์ ํ ๊ณณ์ ๋ชจ์๋์ผ๋ ์ฝ๋๊ฐ ์ฝ๊ฒ ์ฝํ์ง ์๋๊ฑฐ ๊ฐ์์! ์ด๋ฒคํธ ์ข
๋ฅ์ ๋ฐ๋ผ ๋ถ๋ฆฌํ๊ฑฐ๋, EventType์ ๋ฉค๋ฒ๋ณ์๋ก ๋ฃฐ์ ์ ์ํ์๋ ๊ฒ์ ์ด๋ค๊ฐ์? |
@@ -0,0 +1,38 @@
+package christmas.exception;
+
+import christmas.view.output.OutputView;
+import java.util.Arrays;
+import java.util.function.Supplier;
+
+public class RetryHandler implements ExceptionHandler {
+ private final OutputView outputView;
+
+ public RetryHandler(OutputView outputView) {
+ this... | Java | ์ค์ exception๊ณผ ์ธ์๋ก ๋ฐ์ exception์ ๋น๊ตํ๋ ๋ก์ง์ด ํ์ํ ์ด์ ๊ฐ ๊ถ๊ธํด์! |
@@ -0,0 +1,19 @@
+package christmas.constants.event;
+
+public enum EventType {
+ CHRISTMAS("ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด ํ ์ธ"),
+ WEEKDAY("ํ์ผ ํ ์ธ"),
+ WEEKEND("์ฃผ๋ง ํ ์ธ"),
+ SPECIAL("ํน๋ณ ํ ์ธ"),
+ PRESENT("์ฆ์ ์ด๋ฒคํธ");
+
+ private final String description;
+
+ EventType(String description) {
+ this.description = descrip... | Java | `Eventable` ์ธํฐํ์ด์ค์ `๊ฐ๊ฐ์ ์ด๋ฒคํธ ๊ตฌํ์ฒด ํด๋์ค`์์ ํ ์ธ / ์ฆ์ ์ํ ๊ณ์ฐ ์ฒ๋ฆฌํ์ ๋ฐฉ๋ฒ๋ ๊ต์ฅํ ์ง๊ด์ ์ผ๋ก ์ฝํ๊ณ ์ ๋ง ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! ๐
์ ๋ `ํฌ๋ฆฌ์ค๋ง์ค ๋๋ฐ์ด/ ํ์ผ/ ์ฃผ๋ง /ํน๋ณ ํ ์ธ ์ด๋ฒคํธ ์ ํ`๊ณผ `ํ ์ธ ์ด๋ฒคํธ ์ ํ์ ํด๋นํ๋ ๊ณ์ฐ ์ฒ๋ฆฌ`๋ **์๋ก ๋ฐ์ ํ ์ฐ๊ด์ด ์๋ ์์**๋ผ๋ ์๊ฐ์ด ๋ค์์ต๋๋ค! ๊ทธ๋์ `EventType Enum`์์ ํ ์ธ ๊ณ์ฐ ์ฒ๋ฆฌ๋ ํจ๊ป ๊ด๋ฆฌํ๋๋ก ํ์ต๋๋ค.
์ด๋ ๊ฒ ์ฒ๋ฆฌ๋ฅผ ํ๋ **ํ ์ธ ์ด๋ฒคํธ ์ ํ์ด๋ผ๋ ์ํ**์ **์ด๋ฒคํธ ์ ํ์ ๋ํ ๊ณ์ฐ์ฒ๋ฆฌ๋ผ๋ ํ์**๊ฐ ํ ๊ณณ์ ๋ฐ์ง๋์ด ์์ด ์ ์ง๋ณด์ํ... |
@@ -0,0 +1,7 @@
+package christmas.model;
+
+public interface Eventable<T> {
+ boolean canJoinEvent(T condition);
+
+ int getDiscountPrice();
+} | Java | Eventable์ด๋ผ๋ ๊ฐ์ฒด๋ช
์ด ์กฐ๊ธ ํท๊ฐ๋ฆฌ๋๊ฑฐ ๊ฐ์์. ํ์ฌ Eventable์ ์ด๋ฒคํธ ์ฌ๋ถ๋ฅผ ํ๋จํ๋ ๋ฉ์๋์ ํ ์ธ ๊ธ์ก์ ๊ณ์ฐํ๋ ๋ฉ์๋๊ฐ ์กด์ฌํด์. ํ์ง๋ง Eventable ๋ค์ด๋ฐ์ ํ ์ธ ์ฌ๋ถ๋ง ํ๋จํ๋ ์ญํ ์ด๋ผ๊ณ ์คํดํ ์ ์์๊ฑฐ ๊ฐ์ต๋๋ค ๐ฅ |
@@ -0,0 +1,33 @@
+package christmas.model;
+
+import static christmas.constants.event.EventRule.PRESENT_THRESHOLD;
+import static christmas.constants.menu.Menu.CHAMPAGNE;
+
+public class PresentEvent implements Eventable<Integer> {
+ private final int amount;
+
+ private PresentEvent(int orderPrice) {
+ if... | Java | 1 ์ด๋ผ๋ ์ซ์๋ฅผ ์์๋ก ์ ์ธํ๋ ๊ฒ์ ์ด๋ค๊ฐ์? ์๊ตฌ์ฌํญ์ ์ดํดํ์ง ๋ชปํ ์ฌ๋์ด ์ฝ๋๋ฅผ ๋ณด๋ ๊ฒฝ์ฐ 1์ด๋ผ๋ ์ซ์์ ์๋ฏธ๋ฅผ ํ์
ํ๊ธฐ ์ด๋ ค์ธ๊ฑฐ ๊ฐ์์ :) |
@@ -0,0 +1,80 @@
+package christmas.service;
+
+import static christmas.constants.event.EventRule.EVENT_THRESHOLD;
+import static christmas.constants.event.EventType.CHRISTMAS;
+import static christmas.constants.event.EventType.PRESENT;
+import static christmas.constants.event.EventType.SPECIAL;
+import static christma... | Java | EventService๋ ์ถฉ๋ถํ ์ข์ ์ฝ๋๋ผ๊ณ ์๊ฐ๋ฉ๋๋ค!
์ด๋ฒคํธ๋ `ํ ์ธ`์ ๋ํ ์ด๋ฒคํธ, `์ฆ์ ์ํ`์ ๋ํ ์ด๋ฒคํธ๋ก ๋๋๊ธฐ ๋๋ฌธ์ `DiscountEventService`, `GiftEventService`๋ก ๋๋๋ค๋ฉด, ๊ฐ ์๋น์ค ํด๋์ค๊ฐ ์ด๋ค ์ด๋ฒคํธ์ ๋ํด ์ฒ๋ฆฌํ๋์ง ๋ณด๋ค ๋ช
ํํด์ง๊ณ ์ ์ง๋ณด์ํ๊ธฐ๋ ์ข์์ง ๊ฒ ๊ฐ์ต๋๋ค :) |
@@ -0,0 +1,31 @@
+package christmas.model;
+
+import static christmas.constants.event.EventRule.SPECIAL_DISCOUNT;
+
+import christmas.util.DayAnalyzer;
+
+public class SpecialEvent implements Eventable<Integer> {
+ private final int discountPrice;
+
+ private SpecialEvent(Integer date) {
+ if (canJoinEvent... | Java | ํด๋น ๋ก์ง์ ์ ์ ๋ฉ์๋์ ๋ค์ด๊ฐ๋ ๊ฒ์ด ์ ํฉํ ๊ฑฐ ๊ฐ์๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์๋์? ์์ฑ์๋ ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ ์ฑ
์๋ง ๊ฐ๊ณ , ์ ์ ๋ฉ์๋์์ ์กฐ๊ฑด์ ๋ฐ๋ฅธ discountPrice๊ฐ์ ์์ฑ์๋ก ๋๊ฒจ์ค ์ ์์๊ฑฐ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,80 @@
+package christmas.service;
+
+import static christmas.constants.event.EventRule.EVENT_THRESHOLD;
+import static christmas.constants.event.EventType.CHRISTMAS;
+import static christmas.constants.event.EventType.PRESENT;
+import static christmas.constants.event.EventType.SPECIAL;
+import static christma... | Java | ํด๋น ๋ก์ง์ EnumMap์ ์ด๊ธฐํํ๋ ๋ก์ง์ธ๊ฑฐ ๊ฐ์์. ๊ทธ๋ผ ์์ฑ์๊ฐ ์๋ init ์ด๋ผ๋ ์ด๋ฆ์ ์ ์ ๋ฉ์๋๋ฅผ ํตํด ๋ด๋ถ ๋ก์ง์ ์ข ๋ ๋ช
ํํ ํ์
ํ ์ ์๋๋ก ํ๋ ๊ฒ์ ์ด๋ค๊ฐ์? |
@@ -0,0 +1,80 @@
+package christmas.service;
+
+import static christmas.constants.event.EventRule.EVENT_THRESHOLD;
+import static christmas.constants.event.EventType.CHRISTMAS;
+import static christmas.constants.event.EventType.PRESENT;
+import static christmas.constants.event.EventType.SPECIAL;
+import static christma... | Java | ์ด๋ฒคํธ์ ๋ํ ์ ์ฑ
๋ค์ ์ธ๋ถ์์ ์ฃผ์
๋ฐ๋๋ก ํ๋ ๊ฒ์ ์ด๋ค๊ฐ์? ํ์ฌ ์ฝ๋๋ ์์กด ์ญ์ ์์น(DIP)์ ์ค์ํ์ง ์์ ์ฝ๋๋ผ๊ณ ์๊ฐํฉ๋๋ค. ํ ์ธ ์ข
๋ฅ์ ๋ํ ์ ์ฑ
์ด ๋ณํ๋ ๊ฒฝ์ฐ ์ ํ๋ฆฌ์ผ์ด์
์ฝ๋๋ฅผ ์์ ํด์ผํ๋ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค. ๋ฐ๋ผ์, ์ ํ๋ฆฌ์ผ์ด์
๋ด๋ถ์์๋ ์ถ์ ๊ฐ์ฒด์ ์์กดํ๊ณ , service ์์ฑ์์ EnumMap์ ๋๊ฒจ์ฃผ๋ ๊ฒ์ ์ด๋ค๊ฐ์? |
@@ -0,0 +1,98 @@
+package christmas.service;
+
+import static christmas.constants.event.EventRule.MAX_MENU_AMOUNT;
+import static christmas.constants.menu.MenuType.DRINKS;
+import static christmas.exception.ErrorCode.INVALID_MENU_ORDER;
+
+import christmas.constants.menu.Menu;
+import christmas.constants.menu.MenuType;... | Java | ์ผ๋ฐ์ ์ผ๋ก validate ๊ฒ์ฆ ํ
์คํธ๋ public ๋ฉ์๋๋ฅผ ํ
์คํธํ์ฌ ์งํํ๋๋ฐ, ๋ชจ๋ private ๋ฉ์๋๊ฐ ๋์ผํ ์์ธ๋ฅผ ๋์ง๊ณ ์๊ธฐ ๋๋ฌธ์ ๋ฉ์์ง ๋ด์ฉ์ ํ์ธํ๋ ๋ฑ ์ธ๋ถ์ ์ธ ๊ฒ์ฆ ์ ์ฐจ๊ฐ ํ์ํ๋ค ์๊ฐํฉ๋๋ค. `IllegalArgumentException`์ด ์ ํํ ์ด๋ ์ง์ ์์ ๋ฐ์ํ๋์ง ์๊ธฐ ์ด๋ ค์ฐ๋๊น์!
ํ์ง๋ง ์ด๋ฒ ๋ฏธ์
์ `์๋ฌ๋ฌธ ๋ด์ฉ์ด 2๊ฐ์ง`๋ก ์ ํด์ ธ ์๊ธฐ ๋๋ฌธ์, ์ด์ ๋ฏธ์
๊ฐ์ด `์๋ฌ๋ฌธ ๋ด์ฉ์ผ๋ก ์ธ๋ถ์ ์ธ ํ
์คํธ`๋ฅผ ํ๊ธฐ๊ฐ ์ด๋ ค์ ์ต๋๋ค. ๊ทธ๋์ ์ ๋ ์ธ๋ถ ๊ฒ์ฆ์ ์ํด **์ปค์คํ
์์ธ**๋ฅผ ๋์
ํ์ฌ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์๋๋ฐ, ์ฐธ๊ณ ํ์๋ฉด ์ข์ ๊ฒ ... |
@@ -0,0 +1,45 @@
+package christmas.util;
+
+import static christmas.constants.Day.FRIDAY;
+import static christmas.constants.Day.SATURDAY;
+import static christmas.constants.Day.SUNDAY;
+import static christmas.constants.Day.THURSDAY;
+
+import christmas.constants.Day;
+import java.util.Arrays;
+
+public class DayAnal... | Java | ์ ๋ ๋ ์ง๋ฅผ ํ๋์ฝ๋ฉํด๋ฒ๋ ธ๋๋ฐ,,, DayAnalyzer ํด๋์ค ์ ๋ง ์ง๊ด์ ์ด๊ณ ์ข์ ์ ๊ทผ ๋ฐฉ์์ธ ๊ฒ ๊ฐ์ต๋๋ค ๐๐ |
@@ -0,0 +1,7 @@
+package christmas.exception;
+
+import java.util.function.Supplier;
+
+public interface ExceptionHandler {
+ <T> T execute(Supplier<T> action, Class<? extends Exception>... exceptions);
+} | Java | `Class<? extends Exception>... exceptions`๋ ์ด๋ค ์ญํ ์ ํ๋ผ๋ฏธํฐ์ธ์ง, ์ด๋ป๊ฒ ํ์ฉ๋๋์ง ์ฌ์ญค๋ณด๊ณ ์ถ์ต๋๋ค! |
@@ -0,0 +1,30 @@
+package christmas.constants.event;
+
+public enum BadgeType {
+ NONE("์์", 0),
+ STAR("๋ณ", 5_000),
+ TREE("ํธ๋ฆฌ", 10_000),
+ SANTA("์ฐํ", 20_000);
+
+ private final String name;
+ private final int threshold;
+
+ BadgeType(String name, int threshold) {
+ this.name = name;
+ ... | Java | stream์ผ๋ก ์ต์ ํ ํ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,13 @@
+package christmas.dto;
+
+import christmas.util.Parser;
+import java.util.List;
+
+public record SingleMenu(String menu, int amount) {
+ private static final String DELIMITER = "-";
+
+ public static SingleMenu create(String singleOrder) {
+ List<String> parsed = Parser.parseToMenu(single... | Java | SingleMenu๋ฅผ record๋ก ํ์ ์ด์ ๊ฐ ๋ฌด์์ธ๊ฐ์? |
@@ -0,0 +1,38 @@
+package christmas.exception;
+
+import christmas.view.output.OutputView;
+import java.util.Arrays;
+import java.util.function.Supplier;
+
+public class RetryHandler implements ExceptionHandler {
+ private final OutputView outputView;
+
+ public RetryHandler(OutputView outputView) {
+ this... | Java | @safevarargs๋ ์ ์ฌ์ฉํ์ ๊ฑด๊ฐ์? |
@@ -0,0 +1,80 @@
+package christmas.service;
+
+import static christmas.constants.event.EventRule.EVENT_THRESHOLD;
+import static christmas.constants.event.EventType.CHRISTMAS;
+import static christmas.constants.event.EventType.PRESENT;
+import static christmas.constants.event.EventType.SPECIAL;
+import static christma... | Java | ์ด๋ฒคํธ๊ฐ ์ถ๊ฐ๋ ๋๋ง๋ค put์ ํด์ผํ๋ ๋ถํธํจ์ด ์์ ๊ฒ ๊ฐ์ต๋๋ค |
@@ -0,0 +1,98 @@
+package christmas.service;
+
+import static christmas.constants.event.EventRule.MAX_MENU_AMOUNT;
+import static christmas.constants.menu.MenuType.DRINKS;
+import static christmas.exception.ErrorCode.INVALID_MENU_ORDER;
+
+import christmas.constants.menu.Menu;
+import christmas.constants.menu.MenuType;... | Java | stream์ int๋ก ์บ์คํ
ํ๋ ๊ฒ์ด ์ดํด๊ฐ ๋์ง ์์ต๋๋ค. |
@@ -0,0 +1,167 @@
+## ํ ์ค๋ก ํํํ๋ ํต์ฌ ๊ธฐ๋ฅ!
+
+> ๐๋ ์ง์ ์ฃผ๋ฌธ ๋ด์ญ์ ์กฐ๊ฑด์ ๋ง์ถฐ 12์ ํ ์ธ ์ด๋ฒคํธ๋ฅผ ์ ์ฉํ๊ธฐ
+
+---
+
+### ๊ธฐ๋ฅ ์๊ตฌ ์ฌํญ
+
+1๏ธโฃ 12์ ์ด๋ฒคํธ์ ๊ด๋ จ๋ ์ ๋ณด ์
๋ ฅ๋ฐ๊ธฐ
+
+-[x] ์ธ์ฟ๋ง ์ถ๋ ฅ
+-[x] ์์ ๋ฐฉ๋ฌธ ๋ ์ง ์
๋ ฅ๋ฐ๊ธฐ
+ -[x] โ ๏ธ ์ ํจํ์ง ์์ ๊ฐ์ ๋ฐ์์ ๋ ์์ธ์ฒ๋ฆฌ
+ -[x] ์ซ์๋ฅผ ์
๋ ฅํ์ง ์์์ ๋
+ -[x] 1์ผ์์ 31์ผ ์ฌ์ด์ ์๊ฐ ์๋ ๋: *[ERROR] ์ ํจํ์ง ์์ ๋ ์ง์
๋๋ค. ๋ค์ ์
๋ ฅํด ์ฃผ์ธ์.*
+ -[x] ์ ํจํ์ง ์... | Unknown | ์ ๋ค๋ฆญ์ ์ฌ์ฉํด Discountable๋ก ํํํ ๊ฒ์ด ๋งค์ฐ ์ธ์๊น๋ค์! ์ฝ๋ ๋ฆฌ๋ทฐํ ๋๋ ๋ณด๋ฉด์ ๊ณต๋ถํ๋๋ก ํ๊ฒ ์ต๋๋ค ๐ซก |
@@ -0,0 +1,97 @@
+package christmas.config;
+
+import christmas.controller.EventController;
+import christmas.exception.RetryHandler;
+import christmas.service.EventService;
+import christmas.service.MenuService;
+import christmas.validator.InputValidator;
+import christmas.view.input.ConsoleReader;
+import christmas.v... | Java | outview์ ๊ฒฝ์ฐ static๋ฉ์๋๋ฅผ ํ์ฉํด ๊ฐ์ฒด๋ฅผ ์์ฑํ์ง ์๋ ๋ฐฉ๋ฒ๋ ์๋๋ฐ, ๊ทธ๋ผ์๋ ์ฑ๊ธํค ํจํด์ ์ ์งํ์ ์ด์ ๊ฐ ์์๊น์? |
@@ -0,0 +1,94 @@
+package christmas.controller;
+
+import static christmas.constants.event.EventType.PRESENT;
+import static christmas.constants.menu.MenuType.DESSERT;
+import static christmas.constants.menu.MenuType.MAIN;
+
+import christmas.constants.event.BadgeType;
+import christmas.dto.SingleMenu;
+import christma... | Java | print๋ผ๋ ๋ค์ด๋ฐ์ ์ปจํธ๋กค๋ฌ๊ฐ ์ถ๋ ฅ์ ๋ด๋นํ๋ค ๋ผ๋ ๋ป์ผ๋ก ๋ณด์
๋๋ค! ๋ค๋ฅธ ๋ง๋ก ๋์ฒด ํ๋๊ฑด ์ด๋ป๊ฒ ์๊ฐํ์ธ์? |
@@ -0,0 +1,25 @@
+package christmas.constants.event;
+
+public enum EventRule {
+ EVENT_THRESHOLD(10_000),
+ PRESENT_THRESHOLD(120_000),
+ EVENT_START(1),
+ EVENT_END(31),
+ MAX_MENU_AMOUNT(20),
+ CHRISTMAS_EVENT_END(25),
+ CHRISTMAS_INIT_PRICE(1_000),
+ CHRISTMAS_EXTRA_DISCOUNT(100),
+ MENU_... | Java | ๊ฐ์ธ์ ์ผ๋ก enum์ ์ฐ๊ด๋ ์์๋ฅผ ๋ชจ์๋๋ ๊ณณ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค!
CHRISTMAS_EXTRA_DISCOUNT(100),
MENU_DISCOUNT(2_023),
๋ฑ์ ์๋ก ๋ค๋ฅธ ๊ฐ์ฒด๋จ์๋ก ๋ถ๋ฆฌ๊ฐ ๊ฐ๋ฅํด๋ณด์ฌ์!
์ฐจ๋ผ๋ฆฌ ๊ฐ์ฒด ๋ด๋ถ์ ์์ ํ๋๋ก ๊ด๋ฆฌํ๋ ๊ฒ์ ์ด๋ ์ธ์? |
@@ -0,0 +1,167 @@
+## ํ ์ค๋ก ํํํ๋ ํต์ฌ ๊ธฐ๋ฅ!
+
+> ๐๋ ์ง์ ์ฃผ๋ฌธ ๋ด์ญ์ ์กฐ๊ฑด์ ๋ง์ถฐ 12์ ํ ์ธ ์ด๋ฒคํธ๋ฅผ ์ ์ฉํ๊ธฐ
+
+---
+
+### ๊ธฐ๋ฅ ์๊ตฌ ์ฌํญ
+
+1๏ธโฃ 12์ ์ด๋ฒคํธ์ ๊ด๋ จ๋ ์ ๋ณด ์
๋ ฅ๋ฐ๊ธฐ
+
+-[x] ์ธ์ฟ๋ง ์ถ๋ ฅ
+-[x] ์์ ๋ฐฉ๋ฌธ ๋ ์ง ์
๋ ฅ๋ฐ๊ธฐ
+ -[x] โ ๏ธ ์ ํจํ์ง ์์ ๊ฐ์ ๋ฐ์์ ๋ ์์ธ์ฒ๋ฆฌ
+ -[x] ์ซ์๋ฅผ ์
๋ ฅํ์ง ์์์ ๋
+ -[x] 1์ผ์์ 31์ผ ์ฌ์ด์ ์๊ฐ ์๋ ๋: *[ERROR] ์ ํจํ์ง ์์ ๋ ์ง์
๋๋ค. ๋ค์ ์
๋ ฅํด ์ฃผ์ธ์.*
+ -[x] ์ ํจํ์ง ์... | Unknown | ๊ณ ๋ฏผ ๋ด์ฉ์ ์ ์ผ์ ๊ฒ... ์ฐธ์ ํ๋ค์ !! ์ ๋ ๋ฆฌ๋๋ฏธ ์์ฑ์ด ํ๋ค์ด์ ใ
.ใ
๋ฐฐ์๊ฐ๋๋ค ๐ |
@@ -0,0 +1,24 @@
+package com.requestrealpiano.songrequest.controller;
+
+import com.requestrealpiano.songrequest.service.AccountService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+i... | Java | ๋ค๋ฅธ ์ปจํธ๋กค๋ฌ์์๋ ResponseStatus๋ก ์ง์ ํ๋๋ฐ ์ฌ๊ธด ResponseEntity๋ก ์ง์ ํ๊ตฐ์ ์ด๋ค ์ด์ ๋ก ์ง์ ํ๋์ง ๊ถ๊ธํฉ๋๋ค. |
@@ -2,18 +2,18 @@
import com.requestrealpiano.songrequest.domain.song.searchapi.response.SearchApiResponse;
import com.requestrealpiano.songrequest.global.response.ApiResponse;
+import com.requestrealpiano.songrequest.global.response.StatusCode;
import com.requestrealpiano.songrequest.service.SongService;
import ... | Java | ์ด ๋ถ๋ถ์ ์ปจํธ๋กค๋ฌ์์ Validation์ ์ก๊ธฐ๋ณด๋จ Validation DTO๋ฅผ ์์ฑํด์ ํด๋น ๊ฐ์ฒด์์ ๊ด๋ฆฌํ๋ฉด ๋์ฑ ํธ๋ฆฌํ๊ณ ๋ณด๊ธฐ๊ฐ ์ข์๋ฏ ํฉ๋๋ค. |
@@ -1,5 +1,6 @@
package com.requestrealpiano.songrequest.domain.account;
+import com.requestrealpiano.songrequest.security.oauth.OAuthAttributes;
import com.requestrealpiano.songrequest.domain.base.BaseTimeEntity;
import com.requestrealpiano.songrequest.domain.letter.Letter;
import lombok.AccessLevel;
@@ -8,9 +9,... | Java | ์ใ
ใ
ใ
ใ
OAuthId๋ฅผ ํ์ธํ์๊ณ ๋ฐ๊พธ์
จ๊ตฐ์. |
@@ -1,5 +1,6 @@
package com.requestrealpiano.songrequest.domain.account;
+import com.requestrealpiano.songrequest.security.oauth.OAuthAttributes;
import com.requestrealpiano.songrequest.domain.base.BaseTimeEntity;
import com.requestrealpiano.songrequest.domain.letter.Letter;
import lombok.AccessLevel;
@@ -8,9 +9,... | Java | ์ฌ๊ธฐ ์ ํ์๋ MaginNumber 0์ ์ด๋ค์๋ฏธ์ธ๊ฐ์? |
@@ -11,6 +11,12 @@ public enum ErrorCode {
METHOD_NOT_ALLOWED(405, "์ง์ํ์ง ์๋ ์์ฒญ ๋ฉ์๋ ์
๋๋ค."),
INTERNAL_SERVER_ERROR(500, "์๋ฒ์์ ์์ฒญ์ ์ฒ๋ฆฌํ์ง ๋ชปํ์ต๋๋ค."),
+ // Auth
+ UNAUTHENTICATED_ERROR(401, "์ธ์ฆ์ด ํ์ํฉ๋๋ค. ๋ก๊ทธ์ธ ์ดํ ๋ค์ ์๋ ํด์ฃผ์ธ์."),
+ JWT_INVALID_ERROR(400, "์ฌ๋ฐ๋ฅธ ์ธ์ฆ ์ ๋ณด๊ฐ ์๋๋๋ค. ๋ค์ ๋ก๊ทธ์ธ ํด์ฃผ์ธ์."),
+ JWT_EXPIRATION_ERRO... | Java | ์ฌ๊ธฐ์ JWT ์ธ์ฆํ ๋ ๋๊ฐ์ง ์กฐ๊ฑด์ด ์๋๊ตฐ์.
1. JWT๊ฐ ์๋ Token์ ์ฌ์ฉํ ๊ฒฝ์ฐ - 400
2. JWT๋ ๋ง๋๋ฐ ์ฌ๋ฐ๋ฅธ JWT๊ฐ ์๋ ๊ฒฝ์ฐ - 401
๋๊ฐ์ง ๊ณ ๋ คํ์๋๊ฑด ์ด๋ ์ ์ง ๋๋ ์๊ฒฌ์ด ๊ถ๊ธํฉ๋๋ค. |
@@ -11,6 +11,12 @@ public enum ErrorCode {
METHOD_NOT_ALLOWED(405, "์ง์ํ์ง ์๋ ์์ฒญ ๋ฉ์๋ ์
๋๋ค."),
INTERNAL_SERVER_ERROR(500, "์๋ฒ์์ ์์ฒญ์ ์ฒ๋ฆฌํ์ง ๋ชปํ์ต๋๋ค."),
+ // Auth
+ UNAUTHENTICATED_ERROR(401, "์ธ์ฆ์ด ํ์ํฉ๋๋ค. ๋ก๊ทธ์ธ ์ดํ ๋ค์ ์๋ ํด์ฃผ์ธ์."),
+ JWT_INVALID_ERROR(400, "์ฌ๋ฐ๋ฅธ ์ธ์ฆ ์ ๋ณด๊ฐ ์๋๋๋ค. ๋ค์ ๋ก๊ทธ์ธ ํด์ฃผ์ธ์."),
+ JWT_EXPIRATION_ERRO... | Java | ์ฌ๊ธฐ์๋ ์ด์ผ๊ธฐ ํ๊ณ ์ถ์๊ฒ์ด ์์ต๋๋ค. ํด๋น API๋ฅผ ์ฌ์ฉํ ๋ ๊ถํ์ ๋ง๋ ๊ฒ์ด 403์ด์ง๋ง ๋ง์ฝ ๋น๊ณต๊ฐ๋ ์ ๋ณด๋ฅผ API๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐ์ ธ์ฌ๋๋ 404๋ก Not Found๋ก ๋์์ผํ๋ค๊ณ ํ๋๊ตฐ์.
๊ทธ์ ๋ํ ๋๋น์ฑ
๋ ํ์ํด ๋ณด์
๋๋ค. |
@@ -0,0 +1,105 @@
+package com.requestrealpiano.songrequest.security;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.requestrealpiano.songrequest.domain.account.Role;
+import com.requestrealpiano.songrequest.security.filter.JwtAuthorizationFilter;
+import com.requestrealpiano.songrequest.security.jw... | Java | ์ฌ์ฉํ์์ง ์์ ์ฝ๋๋ฉด ์ญ์ ํ๊ณ ๊ทธ๋๋ ์ฃผ์์ฒ๋ฆฌ๋ฅผ ๋จ๊ธฐ๊ณ ์ถ๋ค๋ฉด ์ ์ฃผ์์ฒ๋ฆฌํ๋์ง์ ๋ํ ์ค๋ช
์ ์ถ๊ฐํด์ฃผ์ธ์ |
@@ -0,0 +1,105 @@
+package com.requestrealpiano.songrequest.security;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.requestrealpiano.songrequest.domain.account.Role;
+import com.requestrealpiano.songrequest.security.filter.JwtAuthorizationFilter;
+import com.requestrealpiano.songrequest.security.jw... | Java | Role์ ์์ฃผ ์ฌ์ฉํ์ค ๋ฏํ๋ฐ import static์ผ๋ก ์ ์ธํ๋ ๊ฒ๋ ๋์์ง ์๋ค๊ณ ์๊ฐํฉ๋๋ค. |
@@ -0,0 +1,105 @@
+package com.requestrealpiano.songrequest.security;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.requestrealpiano.songrequest.domain.account.Role;
+import com.requestrealpiano.songrequest.security.filter.JwtAuthorizationFilter;
+import com.requestrealpiano.songrequest.security.jw... | Java | `WebConfig`์์๋ CORS ์๋ฌ์ ๋ํ ๋๋น์ฑ
์ ์ค์ ํ์
จ๋๋ฐ ์ฌ๊ธฐ์๋ ์ค์ ํ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค. |
@@ -0,0 +1,115 @@
+package com.requestrealpiano.songrequest.security.jwt;
+
+import com.requestrealpiano.songrequest.domain.account.Account;
+import com.requestrealpiano.songrequest.global.error.exception.jwt.JwtExpirationException;
+import com.requestrealpiano.songrequest.global.error.exception.jwt.JwtInvalidTokenExce... | Java | Date ํ์
์ ์ฐ์
จ๋๋ฐ LocalDate ํ์
์ด ์๋ ์ด์ ๊ฐ ๋ฌด์์ธ๊ฐ์? |
@@ -0,0 +1,21 @@
+package com.requestrealpiano.songrequest.security.jwt;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.ConstructorBinding;
+
+@RequiredArgsConstructor
+@Get... | Java | ์์ฑ์๊ฐ ํ์ํ๊ฐ์? ๋ถํ์ํ ์์ฑ์๊ฐ์์ |
@@ -0,0 +1,33 @@
+package com.requestrealpiano.songrequest.security.oauth;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.requestrealpiano.songrequest.global.error.response.ErrorCode;
+import com.requestrealpiano.songrequest.global.error.response.ErrorResponse;
+import lombok.RequiredArgsConstructor... | Java | ์ด์ ๋ ๊ธธ์ด์ง๋ฉด throws๋ถํฐ ํ์นธ ๋ด๋ ค์ ๋ณด๊ธฐ ์ฝ๊ฒ ํด์ฃผ์ธ์ฉ |
@@ -0,0 +1,33 @@
+package com.requestrealpiano.songrequest.security.oauth;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.requestrealpiano.songrequest.global.error.response.ErrorCode;
+import com.requestrealpiano.songrequest.global.error.response.ErrorResponse;
+import lombok.RequiredArgsConstructor... | Java | ์ฌ๊ธฐ์ ๊ถ๊ธํ๊ฒ ์ด๋๋ก ์ฌ์ฉํ์ ๋ ์๋ฌ์ฒ๋ฆฌ๋ ๋ฐ์์ด ์ ๋๊ฒ ์ผ๋ ์คํ๋ง ๋ก๊ทธ์๋ ์ฐํ๋ ์ง ๊ถ๊ธํฉ๋๋ค.
์ ๊ฐ ์ด์ ์ฝ๋์ค์ฟผ๋ ๋์๊ด ํ๋ก์ ํธ์์๋ ์ด๋ฐ์์ผ๋ก ์ฒ๋ฆฌํ์ ๋ ๋ก๊ทธ์ ์ฐํ์ง ์๋ ์ฌ์ํ ๋ฌธ์ ์ ์ด ์๊ฒผ์ต๋๋ค. |
@@ -0,0 +1,33 @@
+package com.requestrealpiano.songrequest.security.oauth;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.requestrealpiano.songrequest.global.error.response.ErrorCode;
+import com.requestrealpiano.songrequest.global.error.response.ErrorResponse;
+import lombok.RequiredArgsConstructor... | Java | ๊ทธ๋์ ์๊ฐํด๋ธ ๊ฒ์ด `AccessDeniedException`์ ๋ฐ๋ ์๋ฌํด๋์ค๋ฅผ ๋ง๋ค๊ณ ํด๋น ์๋ฌ๋ฅผ ์์๋ฐ์ ์ฌ๊ธฐ์ ์๋ฌ๊ฐ ๋ฐ์ํ๋ฉด ํด๋น ํด๋์ค๋ฅผ ํธ์ถํ๋ ๋ฐฉ์์ ์ฌ์ฉํ์ฌ ๋ค๋ฅธ exceptionHandler์ฒ๋ผ ํ๋ฒ์ ๊ด๋ฆฌํ๊ธฐ๋ ํธํ๊ณ ๋ก๊ทธ๋ ์ฐํ ์ ์๋ค๊ณ ์๊ฐํ์ต๋๋ค.
```java
@Component("restAuthenticationEntryPoint")
public class RestAuthenticationEntryPoint implements AuthenticationEntryPoint {
@Autowired
privat... |
@@ -0,0 +1,14 @@
+package com.requestrealpiano.songrequest.security.oauth;
+
+import org.springframework.security.core.annotation.AuthenticationPrincipal;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target... | Java | ์ด๊ฒ๋ง ๋ฌ์๋ GlobalAdvice ์ค์ ์ ํ ํ์๊ฐ ์์ด์ ์ข์ฃ ! |
@@ -0,0 +1,24 @@
+package com.requestrealpiano.songrequest.controller;
+
+import com.requestrealpiano.songrequest.service.AccountService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+i... | Java | ๋ถ๋ช
๋ชจ๋ ์ปจํธ๋กค๋ฌ๋ฅผ ๋์์ ์์ ์ ํ์ํ
๋ฐ ์ฌ๊ธฐ๋ ์ํ์ฝ๋๋ง ๋ฐ๊พธ๊ณ ํ์์ ์ด๋ ๊ฒ ๋จ๊ฒจ ๋์์๋ค์.
ํต์ผ์ฑ์ ์ํด ์์ ํ๊ฒ ์ต๋๋คใ
ใ
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.