From 1d41a95a32aab9055b62ecd1cec9d29e4e247a2c Mon Sep 17 00:00:00 2001 From: joung-pjh Date: Fri, 20 Dec 2024 08:31:58 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=C3=AC=C2=B1=C3=A3=C2=85json=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 8 ++ .idea/code-review.iml | 11 ++ .idea/misc.xml | 10 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + out/production/code-review/.idea/.gitignore | 8 ++ .../code-review/.idea/code-review.iml | 11 ++ out/production/code-review/.idea/misc.xml | 10 ++ out/production/code-review/.idea/modules.xml | 8 ++ out/production/code-review/.idea/vcs.xml | 6 + out/production/code-review/README.md | 1 + .../App/App.class" | Bin 0 -> 562 bytes .../BulletinBoardController.class" | Bin 0 -> 3429 bytes .../BulletinBoardRepository.class" | Bin 0 -> 6069 bytes .../BulletinBoardService.class" | Bin 0 -> 4956 bytes .../Main.class" | Bin 0 -> 505 bytes .../db/1.json" | 1 + .../db/2.json" | 1 + .../db/3.json" | 1 + .../db/4.json" | 1 + .../db/5.json" | 1 + .../db/6.json" | 1 + .../db/7.json" | 1 + .../db/8.json" | 1 + .../db/data.json" | 42 ++++++ .../db/lastId.txt" | 1 + .../dblastId.txt" | 1 + .../Proverb.class" | Bin 0 -> 1484 bytes .../App/App.java" | 16 +++ .../BulletinBoardController.java" | 99 +++++++++++++++ .../BulletinBoardRepository.java" | 96 ++++++++++++++ .../BulletinBoardService.java" | 120 ++++++++++++++++++ .../Main.java" | 11 ++ .../Proverb.java" | 40 ++++++ .../db/1.json" | 1 + .../db/2.json" | 1 + .../db/3.json" | 1 + .../db/4.json" | 1 + .../db/5.json" | 1 + .../db/6.json" | 1 + .../db/7.json" | 1 + .../db/8.json" | 1 + .../db/data.json" | 42 ++++++ .../db/lastId.txt" | 1 + .../dblastId.txt" | 1 + 45 files changed, 573 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/code-review.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 out/production/code-review/.idea/.gitignore create mode 100644 out/production/code-review/.idea/code-review.iml create mode 100644 out/production/code-review/.idea/misc.xml create mode 100644 out/production/code-review/.idea/modules.xml create mode 100644 out/production/code-review/.idea/vcs.xml create mode 100644 out/production/code-review/README.md create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/App/App.class" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardController/BulletinBoardController.class" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardRepository/BulletinBoardRepository.class" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardService/BulletinBoardService.class" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/Main.class" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" create mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" create mode 100644 "out/production/code-review/\353\257\270\353\213\210\352\263\274\354\240\234/Proverb.class" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/App/App.java" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardController/BulletinBoardController.java" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardRepository/BulletinBoardRepository.java" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardService/BulletinBoardService.java" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/Main.java" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/Proverb.java" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" create mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/code-review.iml b/.idea/code-review.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/.idea/code-review.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..820225d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..07225ff --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/code-review/.idea/.gitignore b/out/production/code-review/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/out/production/code-review/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/out/production/code-review/.idea/code-review.iml b/out/production/code-review/.idea/code-review.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/out/production/code-review/.idea/code-review.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/code-review/.idea/misc.xml b/out/production/code-review/.idea/misc.xml new file mode 100644 index 0000000..820225d --- /dev/null +++ b/out/production/code-review/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/out/production/code-review/.idea/modules.xml b/out/production/code-review/.idea/modules.xml new file mode 100644 index 0000000..07225ff --- /dev/null +++ b/out/production/code-review/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/out/production/code-review/.idea/vcs.xml b/out/production/code-review/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/out/production/code-review/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/code-review/README.md b/out/production/code-review/README.md new file mode 100644 index 0000000..4444cb9 --- /dev/null +++ b/out/production/code-review/README.md @@ -0,0 +1 @@ +# code-review \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/App/App.class" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/App/App.class" new file mode 100644 index 0000000000000000000000000000000000000000..450452182ea6b9fb7546f713ef457e37f200842e GIT binary patch literal 562 zcmb7?%}&BV5Xb-97FtRL#BV%#Qx5j#1vOd{PeczI5|2x1bV+T=()tW0zJdqez!*O; zYJ316MSKS1tP(g74<2?i|Jj+}&dl!n*Yg{IEiBv6pqnrpWRPVjb@(}VLmr*D2dz%v zCk)w55s74*L0?^Kny?sldeV0XH&27hi;uh4&+9AKOT#coMC8R>w(D_}$e0}RFTV{F zdJcIwCZ-$|P-Iw~fbMp?E-ePz9}yY6#zf#hZ?CEAryZ14! zPtRI`JmRg8Jmp60^RUUKPAI7QlgFT^G7M-rE31fwt z*XRX^ui7U|Bb%Op_8C$hbh3a_wGUQ(fqC3V?g94gPvk7^1&RQ2Fkn-D9&@Ce-yFaHcvkfu_9IGTj`{$KW)fx0uttm}I@M752KM@l6#xJL literal 0 HcmV?d00001 diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardController/BulletinBoardController.class" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardController/BulletinBoardController.class" new file mode 100644 index 0000000000000000000000000000000000000000..0e41cf1f3e54a72dd46cdb6f6ba40d70521c7d20 GIT binary patch literal 3429 zcmai0i(eC07XAi;31N6Nh(e_$eIXEmE!ApyTC7@HuqqVmquUP2ER2REPA0T$cUxL< zmkQh3RTL{wwe6<5eQ7n&t=m6f{}dVB;$TM^(QeVNI(R(u{Tqxiz)@PPim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j*FWO{XX2w#uU3XFC#Ma`Hl9J-mf59nO9|`|Fp$NbmPAvXZk0Ru3@JA zKF@mzyx+6w=e#Q^9!?4#HaVI+f24g+ecJw^u-E4{c_wLhG&MWw>0^)c1h@)EMP34b z$}rc&O2O)!*vZYXi;CGz#k@pSyi5gjqaHovbuYQw$6xpJ*=yk!O(ilLzZj(y;pDo% zAkI3f@C?4zw%OU99JmYxw43*M68YA(b+pji2%9Sum`XfuVpp3EDf#9h9;BbuSv3KA76azL~k&HNK|oOB4%SRKUtaV zFq0i&MXzTit4JrSNGB^yC*%8*ovf3oB_=Bol_YRhNa(!i8EvVfDOJ#$?1#cbX~4=M Or`FgxBz$9efBQeoIj+F~ literal 0 HcmV?d00001 diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardRepository/BulletinBoardRepository.class" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardRepository/BulletinBoardRepository.class" new file mode 100644 index 0000000000000000000000000000000000000000..5b1f42e83dfac1baff1a487ea79c34f40272210b GIT binary patch literal 6069 zcmcIodwdkt75?sKH#3<`0$B*MKrjZ-gajfWQ4$6609niflQam3agv?D!e%G#gNN2W z(OPM(wYB22mfF%P)^`HLYM)xIeb;K=t$ix7?^;1^`rVn?&4vxs{?Xmv&dj~{+;i_a z=R4oIv(Ntf$P)lA5Sjvyz{+^6xBBPV{+_VkW}T2Fr+r+RXtg z9!^-X-6!kU;Dt{?t_}sNz~pVl4x>6^M7LD8^=vbH69T#Choj-da)F%kiY^73fNl$g zt?Jd`h^aysn4PtaP!F}l6T#5J#IA&fJQT_mCJ7XmH;=8+k%)z(Tk0yhq(qSpKc;X& zb5}T?h}#QpR8TB1Ewx}nvaipKnY7CYnK1>Y3HVcEax+f9hG_`MQV9MC2Gu0hGT}LU-5Kv=Ws5u-p1*Vo)WN%!<9L!ZPPsf=!i;Im}7K|p$EoO`= z28>wTWb-7Z2Q^GZg^u~s{l4Ca6*m=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ys(Y}FH2tF*F);O$ zq*;n=+8OPM`WWmvvU8-$R=P@RO%EWC0!0SaP^641J|UQbraz!xj$t@EuQ2D33^X!R bG!2575v(*VKndl@OQ3>v!ckik$FTViZhCaL literal 0 HcmV?d00001 diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" new file mode 100644 index 0000000..9391008 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" @@ -0,0 +1 @@ +{ "id": 1, "proverb": "언젠가 오늘은 간다", "author": "박종현1" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" new file mode 100644 index 0000000..78e015d --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" @@ -0,0 +1 @@ +{ "id": 2, "proverb": "언젠가 내일은 오겠지", "author": "박종현2" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" new file mode 100644 index 0000000..cd67a53 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" @@ -0,0 +1 @@ +{ "id": 3, "proverb": "어제는 왔었네?", "author": "박종현3" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" new file mode 100644 index 0000000..17aaea0 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" @@ -0,0 +1 @@ +{ "id": 4, "proverb": "하늘은 푸르다", "author": "작자미상" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" new file mode 100644 index 0000000..b58e6b5 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" @@ -0,0 +1 @@ +{ "id": 5, "proverb": "하늘은 어둡다", "author": "작자미상" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" new file mode 100644 index 0000000..3210d90 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" @@ -0,0 +1 @@ +{ "id": 6, "proverb": "별이 쏟아진다", "author": "작자미상" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" new file mode 100644 index 0000000..2c048c0 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" @@ -0,0 +1 @@ +{ "id": 7, "proverb": "달이 빛난다", "author": "박종현4" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" new file mode 100644 index 0000000..a790e20 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" @@ -0,0 +1 @@ +{ "id": 8, "proverb": "매일은 매일우유", "author": "메일우유" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" new file mode 100644 index 0000000..ce76355 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" @@ -0,0 +1,42 @@ +[ + { + "id": 1, + "proverb": "언젠가 오늘은 간다", + "author": "종현1" + }, + { + "id": 2, + "proverb": "언젠가 내일은 오겠지", + "author": "종현2" + }, + { + "id": 3, + "proverb": "어제는 왔었네?", + "author": "종현3" + }, + { + "id": 4, + "proverb": "하늘은 푸르다", + "author": "자미상" + }, + { + "id": 5, + "proverb": "하늘은 어둡다", + "author": "자미상" + }, + { + "id": 6, + "proverb": "별이 쏟아진다", + "author": "자미상" + }, + { + "id": 7, + "proverb": "달이 빛난다", + "author": "종현4" + }, + { + "id": 8, + "proverb": "매일은 매일우유", + "author": "일우유" + } +] \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" new file mode 100644 index 0000000..f11c82a --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" new file mode 100644 index 0000000..56a6051 --- /dev/null +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git "a/out/production/code-review/\353\257\270\353\213\210\352\263\274\354\240\234/Proverb.class" "b/out/production/code-review/\353\257\270\353\213\210\352\263\274\354\240\234/Proverb.class" new file mode 100644 index 0000000000000000000000000000000000000000..2da51479cc2ce4546a8ecef5568cc907b586c19b GIT binary patch literal 1484 zcma)6+fEZv6kVscY3pz+rGR(=1Z;;(yrA;u5zQ^apD?lUvck&ebR=eB3!$9mFvN?cjSSMrD9EZf1C=3v^zO^i%NIXBe*O98b@{1n z?FqZV5Yt->tR}(zDh4pfptO%a=IY%TYp$)En-vMnsTh{P6z{lOmYt*YMpP6q$}qai zcSO}Po7{b-yIZt#TyDA!!`))7m#x=Q>NPPG|I>GaAyKtjf?=Spo8ob2w;}9x-Z03L zt6NQOY;aqb=fIe7w{*&_P>&L)!jRk)ZjA&YJ!=eEI-LlYFGi-CAR{$#>1_*iEsj%iPr<>XK{+b^d{6xsGe|_9HcBMD@kmV1@_5HSp zfIko6{rg%83m8yTxnZp7uBfDOm9$}#e%fK@zW1k`^O4TekoyQ`bFJUH#yh3@( zl2Y0{>C}}-{<(o9NK%PXmV%EuktOA|L6$rl%@vZ{=b9p}>A!GEIVIQJNm0w5yg*LM tNn?mc-ytcF(-qEzD$E7>#c|mav4|3_X=2uBT){OuWodUEH*p)|zX8E)Ev5hf literal 0 HcmV?d00001 diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/App/App.java" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/App/App.java" new file mode 100644 index 0000000..bfbae8b --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/App/App.java" @@ -0,0 +1,16 @@ +package src.미니과제.App; + + +import src.미니과제.BulletinBoardController.BulletinBoardController; + +public class App { + private final BulletinBoardController controller; + + public App() { + this.controller = new BulletinBoardController(); + } + + public void run() { + controller.start(); + } +} diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardController/BulletinBoardController.java" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardController/BulletinBoardController.java" new file mode 100644 index 0000000..041deca --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardController/BulletinBoardController.java" @@ -0,0 +1,99 @@ +package src.미니과제.BulletinBoardController; + + +import src.미니과제.BulletinBoardService.BulletinBoardService; + +import java.util.Scanner; + +public class BulletinBoardController { + private final BulletinBoardService service; + private final Scanner scanner; + + public BulletinBoardController() { + this.service = new BulletinBoardService(); + this.scanner = new Scanner(System.in); + } + + public void start() { + System.out.println("== 명언 =="); + + while (true) { + System.out.print("명령) "); + String command = scanner.nextLine(); + + if (command.equals("등록")) { + registerProverb(); + } else if (command.equals("목록")) { + listProverb(); + } else if (command.startsWith("검색")) { + searchProverb(command); + } else if (command.startsWith("삭제?id=")) { + deleteProverb(command); + } else if (command.startsWith("수정?id=")) { + updateProverb(command); + } else if (command.equals("빌드")) { + buildDataFile(); // 빌드 명령 처리 + } else if (command.equals("종료")) { + System.out.println("프로그램이 종료되었습니다."); + break; + } else { + System.out.println("잘못된 명령어입니다."); + } + } + } + + private void registerProverb() { + System.out.print("명언 : "); + String proverb = scanner.nextLine(); + + System.out.print("작가 : "); + String author = scanner.nextLine(); + + if (proverb.trim().isEmpty() || author.trim().isEmpty()) { + System.out.println("명언과 작가는 반드시 입력해야 합니다."); + return; + } + + service.addProverb(proverb, author); + } + + private void listProverb() { + System.out.print("페이지 번호 입력: "); + int page = Integer.parseInt(scanner.nextLine()); + service.listProverbs(page); + } + + private void searchProverb(String command) { + String[] parts = command.split("\\?"); + + if (parts.length < 2) { + System.out.println("잘못된 검색 명령어입니다. 형식: 검색?keywordType=<검색타입>&keyword=<검색어>"); + return; + } + + String[] keywords = parts[1].split("&"); + if (keywords.length < 2) { + System.out.println("검색타입 또는 검색어가 누락되었습니다."); + return; + } + + String keywordType = keywords[0].split("=")[1]; + String keyword = keywords[1].split("=")[1]; + service.searchProverb(keywordType, keyword); + } + + private void deleteProverb(String command) { + int id = Integer.parseInt(command.split("=")[1]); + service.deleteProverb(id); + } + + private void updateProverb(String command) { + int id = Integer.parseInt(command.split("=")[1]); + service.updateProverb(id, scanner); + } + + private void buildDataFile() { + service.saveProverbsToData(); // 데이터 파일 빌드 + System.out.println("data.json 파일이 생성되었습니다."); + } +} diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardRepository/BulletinBoardRepository.java" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardRepository/BulletinBoardRepository.java" new file mode 100644 index 0000000..b016949 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardRepository/BulletinBoardRepository.java" @@ -0,0 +1,96 @@ +package src.미니과제.BulletinBoardRepository; + +import 미니과제.Proverb; + +import java.io.*; +import java.util.*; + +public class BulletinBoardRepository { + private static final String DB = "src/미니과제/db/"; + private static final String LAST_ID_FILE = DB + "lastId.txt"; + private static final String DATA_PROVERB_FILE = DB + "data.json"; + + public int readLastId() { + File file = new File(LAST_ID_FILE); + if (!file.exists()) return 1; + + try (BufferedReader br = new BufferedReader(new FileReader(file))) { + return Integer.parseInt(br.readLine()); + } catch (IOException e) { + e.printStackTrace(); + } + return 1; + } + + public void saveLastId(int id) { + try (BufferedWriter bw = new BufferedWriter(new FileWriter(LAST_ID_FILE))) { + bw.write(String.valueOf(id)); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public List loadProverbs() { + List proverbs = new ArrayList<>(); + File folder = new File(DB); + + File[] files = folder.listFiles((dir, name) -> name.endsWith(".json")); + if (files != null) { + for (File file : files) { + try (BufferedReader br = new BufferedReader(new FileReader(file))) { + String json = br.readLine(); // 한 줄만 읽기 + // JSON 형식에서 id, content, author 추출 + try { + String idString = json.substring(json.indexOf(":") + 1, json.indexOf(",")).trim(); + String proverb = json.substring(json.indexOf("proverb") + 11, json.indexOf(",", json.indexOf("proverb")) - 1).trim(); + String author = json.substring(json.indexOf("author") + 11, json.lastIndexOf("\"")).trim(); + + int id = Integer.parseInt(idString); + proverbs.add(new Proverb(id, proverb, author)); + } catch (StringIndexOutOfBoundsException e) { + System.out.println("JSON 형식이 잘못되었습니다: " + json); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return proverbs; + } + + public void saveProverb(Proverb proverb) { + File file = new File(DB + proverb.getId() + ".json"); + try (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) { + String json = "{ \"id\": " + proverb.getId() + ", \"proverb\": \"" + proverb.getProverb() + "\", \"author\": \"" + proverb.getAuthor() + "\" }"; + bw.write(json); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void deleteProverbFile(int id) { + File file = new File(DB + id + ".json"); + if (file.exists()) file.delete(); + } + + public void saveProverbsToData(List proverbsList) { + try (BufferedWriter bw = new BufferedWriter(new FileWriter(DATA_PROVERB_FILE))) { + bw.write("[\n"); + for (int i = 0; i < proverbsList.size(); i++) { + Proverb proverb = proverbsList.get(i); + String json = " {\n" + + " \"id\": " + proverb.getId() + ",\n" + + " \"proverb\": \"" + proverb.getProverb() + "\",\n" + + " \"author\": \"" + proverb.getAuthor() + "\"\n" + + " }"; + bw.write(json); + if (i < proverbsList.size() - 1) { + bw.write(",\n"); + } + } + bw.write("\n]"); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardService/BulletinBoardService.java" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardService/BulletinBoardService.java" new file mode 100644 index 0000000..3593228 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/BulletinBoardService/BulletinBoardService.java" @@ -0,0 +1,120 @@ +package src.미니과제.BulletinBoardService; + +import src.미니과제.BulletinBoardRepository.BulletinBoardRepository; +import 미니과제.Proverb; + +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +public class BulletinBoardService { + private final BulletinBoardRepository repository; + private final List proverbList; + + public BulletinBoardService() { + this.repository = new BulletinBoardRepository(); + this.proverbList = repository.loadProverbs(); + } + + public void addProverb(String proverb, String author) { + int id = repository.readLastId(); + Proverb proverbObject = new Proverb(id, proverb, author); + proverbList.add(proverbObject); + repository.saveProverb(proverbObject); + repository.saveLastId(id + 1); + System.out.println(id + "번 명언이 등록되었습니다."); + } + + public void listProverbs(int page) { + int itemsPerPage = 5; + int totalItems = proverbList.size(); + int totalPages = (int) Math.ceil((double) totalItems / itemsPerPage); + + if (page < 1 || page > totalPages) { + System.out.println("존재하지 않는 페이지입니다."); + return; + } + + System.out.println("번호 / 작가 / 명언"); + System.out.println("----------------"); + + int startIndex = (page - 1) * itemsPerPage; + int endIndex = Math.min(startIndex + itemsPerPage, totalItems); + + for (int i = startIndex; i < endIndex; i++) { + System.out.println(proverbList.get(i).toString()); + } + + System.out.print("페이지: ["); + for (int i = 1; i <= totalPages; i++) { + System.out.print(i == page ? " " + i + " " : " " + i + " "); + } + System.out.println("]"); + } + + public void searchProverb(String keywordType, String keyword) { + List results = new ArrayList<>(); + + for (Proverb proverb : proverbList) { + if (keywordType.equals("content") && proverb.getProverb().contains(keyword)) { + results.add(proverb); + } else if (keywordType.equals("author") && proverb.getAuthor().contains(keyword)) { + results.add(proverb); + } + } + + if (results.isEmpty()) { + System.out.println("검색 결과가 없습니다."); + return; + } + + System.out.println("번호 / 작가 / 명언"); + System.out.println("----------------"); + for (Proverb proverb : results) { + System.out.println(proverb.toString()); + } + } + + public void deleteProverb(int id) { + boolean check = false; + + for (int i = 0; i < proverbList.size(); i++) { + if (proverbList.get(i).getId() == id) { + proverbList.remove(i); + repository.deleteProverbFile(id); + System.out.println(id + "번째 명언이 삭제되었습니다."); + check = true; + break; + } + } + + if (!check || id <= 0) { + System.out.println(id + "번 명언은 존재하지 않습니다."); + } + } + + public void updateProverb(int id, Scanner scanner) { // Scanner 객체를 매개변수로 받기 + for (Proverb proverb : proverbList) { + if (proverb.getId() == id) { + System.out.println("명언(기존) : " + proverb.getProverb()); + System.out.print("명언 : "); + String newProverb = scanner.nextLine(); + proverb.setProverb(newProverb); + + System.out.println("작가(기존) : " + proverb.getAuthor()); + System.out.print("작가 : "); + String newAuthor = scanner.nextLine(); + proverb.setAuthor(newAuthor); + + repository.saveProverb(proverb); + return; + } + } + System.out.println(id + "번 명언은 존재하지 않습니다."); + } + + public void saveProverbsToData() { + repository.saveProverbsToData(proverbList); + System.out.println("data.json 파일의 내용이 갱신되었습니다."); + } +} diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/Main.java" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/Main.java" new file mode 100644 index 0000000..7f6b7b4 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/Main.java" @@ -0,0 +1,11 @@ +package src.미니과제; + + +import src.미니과제.App.App; + +public class Main { + public static void main(String[] args) { + App app = new App(); + app.run(); + } +} diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/Proverb.java" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/Proverb.java" new file mode 100644 index 0000000..4aa6960 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/Proverb.java" @@ -0,0 +1,40 @@ +package 미니과제; + +public class Proverb { + private int id; // id 필드를 private로 유지 + private String proverb; // private으로 변경 + private String author; // private으로 변경 + + public Proverb(int id, String proverb, String author) { + this.id = id; + this.proverb = proverb; + this.author = author; + } + + // 접근자 메서드 추가 + public int getId() { + return id; + } + + public String getProverb() { + return proverb; + } + + public String getAuthor() { + return author; + } + + // 설정자 메서드 추가 + public void setProverb(String proverb) { + this.proverb = proverb; + } + + public void setAuthor(String author) { + this.author = author; + } + + @Override + public String toString() { + return id + " / " + author + " / " + proverb; + } +} diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" new file mode 100644 index 0000000..9391008 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" @@ -0,0 +1 @@ +{ "id": 1, "proverb": "언젠가 오늘은 간다", "author": "박종현1" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" new file mode 100644 index 0000000..78e015d --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" @@ -0,0 +1 @@ +{ "id": 2, "proverb": "언젠가 내일은 오겠지", "author": "박종현2" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" new file mode 100644 index 0000000..cd67a53 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" @@ -0,0 +1 @@ +{ "id": 3, "proverb": "어제는 왔었네?", "author": "박종현3" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" new file mode 100644 index 0000000..17aaea0 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" @@ -0,0 +1 @@ +{ "id": 4, "proverb": "하늘은 푸르다", "author": "작자미상" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" new file mode 100644 index 0000000..b58e6b5 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" @@ -0,0 +1 @@ +{ "id": 5, "proverb": "하늘은 어둡다", "author": "작자미상" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" new file mode 100644 index 0000000..3210d90 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" @@ -0,0 +1 @@ +{ "id": 6, "proverb": "별이 쏟아진다", "author": "작자미상" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" new file mode 100644 index 0000000..2c048c0 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" @@ -0,0 +1 @@ +{ "id": 7, "proverb": "달이 빛난다", "author": "박종현4" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" new file mode 100644 index 0000000..a790e20 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" @@ -0,0 +1 @@ +{ "id": 8, "proverb": "매일은 매일우유", "author": "메일우유" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" new file mode 100644 index 0000000..ce76355 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" @@ -0,0 +1,42 @@ +[ + { + "id": 1, + "proverb": "언젠가 오늘은 간다", + "author": "종현1" + }, + { + "id": 2, + "proverb": "언젠가 내일은 오겠지", + "author": "종현2" + }, + { + "id": 3, + "proverb": "어제는 왔었네?", + "author": "종현3" + }, + { + "id": 4, + "proverb": "하늘은 푸르다", + "author": "자미상" + }, + { + "id": 5, + "proverb": "하늘은 어둡다", + "author": "자미상" + }, + { + "id": 6, + "proverb": "별이 쏟아진다", + "author": "자미상" + }, + { + "id": 7, + "proverb": "달이 빛난다", + "author": "종현4" + }, + { + "id": 8, + "proverb": "매일은 매일우유", + "author": "일우유" + } +] \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" new file mode 100644 index 0000000..f11c82a --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" new file mode 100644 index 0000000..56a6051 --- /dev/null +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/dblastId.txt" @@ -0,0 +1 @@ +1 \ No newline at end of file From 964bc428a3a180b294a29c01346a0454e14cc835 Mon Sep 17 00:00:00 2001 From: joung-pjh Date: Fri, 20 Dec 2024 16:12:29 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=C3=A3=C2=85TDD=20=C3=AB=20=EA=B0=9C?= =?UTF-8?q?=EB=B0=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/code-review.iml | 16 +++ TDD/Controller/ProverbControllerTest.java | 68 +++++++++++ TDD/Proverb.java | 42 +++++++ TDD/Repository/ProverbRepositoryTest.java | 33 ++++++ TDD/Service/ProverbServiceTest.java | 17 +++ TDD/main/ProverbController.java | 40 +++++++ TDD/main/ProverbRepository.java | 108 ++++++++++++++++++ TDD/main/ProverbService.java | 91 +++++++++++++++ .../code-review/.idea/code-review.iml | 16 +++ .../Controller/ProverbControllerTest.class | Bin 0 -> 2583 bytes out/production/code-review/TDD/Proverb.class | Bin 0 -> 1466 bytes .../Repository/ProverbRepositoryTest.class | Bin 0 -> 1122 bytes .../TDD/Service/ProverbServiceTest.class | Bin 0 -> 882 bytes .../TDD/main/ProverbController.class | Bin 0 -> 1589 bytes .../TDD/main/ProverbRepository.class | Bin 0 -> 6338 bytes .../code-review/TDD/main/ProverbService.class | Bin 0 -> 4244 bytes .../db/1.json" | 1 - .../db/2.json" | 1 - .../db/3.json" | 1 - .../db/4.json" | 1 - .../db/5.json" | 1 - .../db/6.json" | 1 - .../db/7.json" | 1 - .../db/8.json" | 1 - .../db/data.json" | 41 +------ .../db/lastId.txt" | 2 +- .../db/1.json" | 1 - .../db/2.json" | 1 - .../db/3.json" | 1 - .../db/4.json" | 1 - .../db/5.json" | 1 - .../db/6.json" | 1 - .../db/7.json" | 1 - .../db/8.json" | 1 - .../db/data.json" | 41 +------ .../db/lastId.txt" | 2 +- 36 files changed, 435 insertions(+), 98 deletions(-) create mode 100644 TDD/Controller/ProverbControllerTest.java create mode 100644 TDD/Proverb.java create mode 100644 TDD/Repository/ProverbRepositoryTest.java create mode 100644 TDD/Service/ProverbServiceTest.java create mode 100644 TDD/main/ProverbController.java create mode 100644 TDD/main/ProverbRepository.java create mode 100644 TDD/main/ProverbService.java create mode 100644 out/production/code-review/TDD/Controller/ProverbControllerTest.class create mode 100644 out/production/code-review/TDD/Proverb.class create mode 100644 out/production/code-review/TDD/Repository/ProverbRepositoryTest.class create mode 100644 out/production/code-review/TDD/Service/ProverbServiceTest.class create mode 100644 out/production/code-review/TDD/main/ProverbController.class create mode 100644 out/production/code-review/TDD/main/ProverbRepository.class create mode 100644 out/production/code-review/TDD/main/ProverbService.class delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" delete mode 100644 "out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" delete mode 100644 "src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" diff --git a/.idea/code-review.iml b/.idea/code-review.iml index b107a2d..dce5887 100644 --- a/.idea/code-review.iml +++ b/.idea/code-review.iml @@ -7,5 +7,21 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TDD/Controller/ProverbControllerTest.java b/TDD/Controller/ProverbControllerTest.java new file mode 100644 index 0000000..7e061c7 --- /dev/null +++ b/TDD/Controller/ProverbControllerTest.java @@ -0,0 +1,68 @@ +package TDD.Controller; + +import TDD.main.ProverbController; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class ProverbControllerTest { + + private ProverbController controller; + + @BeforeEach + void setUp() { + // 테스트 전에 ProverbController 객체 초기화 + this.controller = new ProverbController(); + } + + + @Test + @DisplayName("명언 등록 테스트") + void testRegisterProverb() { + String result = controller.registerProverb("오늘도 열리지 않는 문을 두드린다.", "박종현"); + assertTrue(result.contains("1번 명언이 등록되었습니다.")); + } + + @Test + @DisplayName("명언 목록 조회 테스트") + void testListProverbs() { + controller.registerProverb("오늘도 열리지 않는 문을 두드린다.", "박종현"); + String result = controller.listProverbs(1); + assertTrue(result.contains("1 / 박종현 / 오늘도 열리지 않는 문을 두드린다.")); + } + + @Test + @DisplayName("명언 검색 테스트") + void testSearchProverb() { + controller.registerProverb("오늘도 열리지 않는 문을 두드린다.", "박종현"); + String result = controller.searchProverb("author", "박종현"); + assertTrue(result.contains("1 / 박종현 / 오늘도 열리지 않는 문을 두드린다.")); + } + + @Test + @DisplayName("명언 삭제 테스트") + void testDeleteProverb() { + controller.registerProverb("오늘도 열리지 않는 문을 두드린다.", "박종현"); + String result = controller.deleteProverb(1); + assertEquals("1번 명언이 삭제되었습니다.", result); + } + + @Test + @DisplayName("명언 수정 테스트") + void testUpdateProverb() { + controller.registerProverb("오늘도 열리지 않는 문을 두드린다.", "박종현"); + String result = controller.updateProverb(1, "문이 열렸다.", "성공한 박종현"); + assertEquals("1번 명언이 수정되었습니다.", result); + } + + @Test + @DisplayName("데이터 파일 저장 테스트") + void testSaveDataFile() { + controller.registerProverb("오늘도 열리지 않는 문을 두드린다.", "박종현"); + String result = controller.saveDataToFile(); + assertEquals("data.json 파일이 생성되었습니다.", result); + } + +} diff --git a/TDD/Proverb.java b/TDD/Proverb.java new file mode 100644 index 0000000..46a7d3f --- /dev/null +++ b/TDD/Proverb.java @@ -0,0 +1,42 @@ +package TDD; + +public class Proverb { + + private int id; // 명언 ID + private String proverb; // 명언 내용 + private String author; // 작가 이름 + + // 생성자 + public Proverb(int id, String proverb, String author) { + this.id = id; + this.proverb = proverb; + this.author = author; + } + + // Getter와 Setter + public int getId() { + return id; + } + + public String getProverb() { + return proverb; + } + + public void setProverb(String proverb) { + this.proverb = proverb; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + // toString 메서드 (목록 출력용) + @Override + public String toString() { + return id + " / " + author + " / " + proverb; + } +} diff --git a/TDD/Repository/ProverbRepositoryTest.java b/TDD/Repository/ProverbRepositoryTest.java new file mode 100644 index 0000000..2aedf69 --- /dev/null +++ b/TDD/Repository/ProverbRepositoryTest.java @@ -0,0 +1,33 @@ +package TDD.Repository; + +import TDD.main.ProverbRepository; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +class ProverbRepositoryTest { + + private ProverbRepository repository; + + @BeforeEach + void setUp() { + repository = new ProverbRepository(); + } + + @Test + @DisplayName("마지막 ID 읽기 테스트") + void testReadLastId() { + int lastId = repository.readLastId(); + assertEquals(1, lastId); // 초기값 1을 기대 + } + + @Test + @DisplayName("마지막 ID 저장 테스트") + void testSaveLastId() { + repository.saveLastId(5); + int lastId = repository.readLastId(); + assertEquals(5, lastId); + } +} diff --git a/TDD/Service/ProverbServiceTest.java b/TDD/Service/ProverbServiceTest.java new file mode 100644 index 0000000..f3431ae --- /dev/null +++ b/TDD/Service/ProverbServiceTest.java @@ -0,0 +1,17 @@ +package TDD.Service; + +import TDD.main.ProverbService; +import org.junit.jupiter.api.Test; + + +import static org.junit.jupiter.api.Assertions.*; + +class ProverbServiceTest { + + @Test + void testAddProverb() { + ProverbService service = new ProverbService(); + String result = service.addProverb("현재를 사랑하라.", "작자미상"); + assertEquals("1번 명언이 등록되었습니다.", result); + } +} diff --git a/TDD/main/ProverbController.java b/TDD/main/ProverbController.java new file mode 100644 index 0000000..42c518f --- /dev/null +++ b/TDD/main/ProverbController.java @@ -0,0 +1,40 @@ +package TDD.main; + + +public class ProverbController { + + private final ProverbService service; + + public ProverbController() { + this.service = new ProverbService(); + } + + public String registerProverb(String proverb, String author) { + if (proverb == null || proverb.isBlank() || author == null || author.isBlank()) { + return "명언과 작가는 반드시 입력해야 합니다."; + } + return service.addProverb(proverb, author); + } + + public String listProverbs(int page) { + return service.getProverbsByPage(page); + } + + public String searchProverb(String keywordType, String keyword) { + return service.searchProverb(keywordType, keyword); + } + + public String deleteProverb(int id) { + return service.deleteProverb(id); + } + + public String updateProverb(int id, String newProverb, String newAuthor) { + return service.updateProverb(id, newProverb, newAuthor); + } + + public String saveDataToFile() { + service.saveProverbsToData(); + return "data.json 파일이 생성되었습니다."; + } + +} diff --git a/TDD/main/ProverbRepository.java b/TDD/main/ProverbRepository.java new file mode 100644 index 0000000..c9739cd --- /dev/null +++ b/TDD/main/ProverbRepository.java @@ -0,0 +1,108 @@ +package TDD.main; + +import TDD.Proverb; + +import java.io.*; +import java.util.*; + +public class ProverbRepository { + private static final String DB_FOLDER = "src/미니과제/db/"; + private static final String LAST_ID_FILE = DB_FOLDER + "lastId.txt"; + private static final String DATA_FILE = DB_FOLDER + "data.json"; + + public int readLastId() { + File file = new File(LAST_ID_FILE); + if (!file.exists()) return 1; + + try (BufferedReader br = new BufferedReader(new FileReader(file))) { + return Integer.parseInt(br.readLine()); + } catch (IOException e) { + e.printStackTrace(); + return 1; + } + } + + public void saveLastId(int id) { + try (BufferedWriter bw = new BufferedWriter(new FileWriter(LAST_ID_FILE))) { + bw.write(String.valueOf(id)); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void saveProverb(Proverb proverb) { + File file = new File(DB_FOLDER + proverb.getId() + ".json"); + try (BufferedWriter bw = new BufferedWriter(new FileWriter(file))) { + String json = "{ \"id\": " + proverb.getId() + ", \"proverb\": \"" + proverb.getProverb() + "\", \"author\": \"" + proverb.getAuthor() + "\" }"; + bw.write(json); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public int getNextId() { + int lastId = readLastId(); + saveLastId(lastId + 1); + return lastId; + } + + + public void deleteProverbFile(int id) { + File file = new File(DB_FOLDER + id + ".json"); + if (file.exists()) file.delete(); + } + + public List loadProverbs() { + List proverbs = new ArrayList<>(); + File folder = new File(DB_FOLDER); + + File[] files = folder.listFiles((dir, name) -> name.endsWith(".json")); + if (files != null) { + for (File file : files) { + try (BufferedReader br = new BufferedReader(new FileReader(file))) { + String json = br.readLine(); + if (json == null || json.isBlank()) { + System.out.println("빈 파일을 무시합니다: " + file.getName()); + continue; + } + + try { + String idString = json.substring(json.indexOf(":") + 1, json.indexOf(",")).trim(); + String proverb = json.substring(json.indexOf("proverb") + 11, json.indexOf(",", json.indexOf("proverb")) - 1).trim(); + String author = json.substring(json.indexOf("author") + 11, json.lastIndexOf("\"")).trim(); + + int id = Integer.parseInt(idString); + proverbs.add(new Proverb(id, proverb, author)); + } catch (StringIndexOutOfBoundsException | NumberFormatException e) { + System.out.println("JSON 형식 오류로 파일을 무시합니다: " + file.getName()); + } + } catch (IOException e) { + System.out.println("파일 읽기 실패: " + file.getName()); + e.printStackTrace(); + } + } + } + return proverbs; + } + + public void saveProverbsToData(List proverbsList) { + try (BufferedWriter bw = new BufferedWriter(new FileWriter(DATA_FILE))) { + bw.write("[\n"); + for (int i = 0; i < proverbsList.size(); i++) { + Proverb proverb = proverbsList.get(i); + String json = " {\n" + + " \"id\": " + proverb.getId() + ",\n" + + " \"proverb\": \"" + proverb.getProverb() + "\",\n" + + " \"author\": \"" + proverb.getAuthor() + "\"\n" + + " }"; + bw.write(json); + if (i < proverbsList.size() - 1) { + bw.write(",\n"); + } + } + bw.write("\n]"); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/TDD/main/ProverbService.java b/TDD/main/ProverbService.java new file mode 100644 index 0000000..3288cdc --- /dev/null +++ b/TDD/main/ProverbService.java @@ -0,0 +1,91 @@ +package TDD.main; + +import TDD.Proverb; + +import java.util.ArrayList; +import java.util.List; + +public class ProverbService { + private final ProverbRepository repository; + private final List proverbList; + + public ProverbService() { + this.repository = new ProverbRepository(); + this.proverbList = repository.loadProverbs(); + } + + public String addProverb(String proverb, String author) { + int id = repository.getNextId(); + Proverb newProverb = new Proverb(id, proverb, author); + proverbList.add(newProverb); + repository.saveProverb(newProverb); + return id + "번 명언이 등록되었습니다."; + } + + public String getProverbsByPage(int page) { + int itemsPerPage = 5; + int startIndex = (page - 1) * itemsPerPage; + int endIndex = Math.min(startIndex + itemsPerPage, proverbList.size()); + + if (startIndex >= proverbList.size() || startIndex < 0) { + return "존재하지 않는 페이지입니다."; + } + + StringBuilder result = new StringBuilder("번호 / 작가 / 명언\n----------------\n"); + for (int i = startIndex; i < endIndex; i++) { + Proverb proverb = proverbList.get(i); + result.append(proverb.getId()).append(" / ").append(proverb.getAuthor()) + .append(" / ").append(proverb.getProverb()).append("\n"); + } + return result.toString(); + } + + public String searchProverb(String keywordType, String keyword) { + List results = new ArrayList<>(); + for (Proverb proverb : proverbList) { + if ("content".equals(keywordType) && proverb.getProverb().contains(keyword)) { + results.add(proverb); + } else if ("author".equals(keywordType) && proverb.getAuthor().contains(keyword)) { + results.add(proverb); + } + } + + if (results.isEmpty()) { + return "검색 결과가 없습니다."; + } + + StringBuilder result = new StringBuilder("번호 / 작가 / 명언\n----------------\n"); + for (Proverb proverb : results) { + result.append(proverb.getId()).append(" / ").append(proverb.getAuthor()) + .append(" / ").append(proverb.getProverb()).append("\n"); + } + return result.toString(); + } + + public String deleteProverb(int id) { + for (int i = 0; i < proverbList.size(); i++) { + if (proverbList.get(i).getId() == id) { + proverbList.remove(i); + repository.deleteProverbFile(id); + return id + "번 명언이 삭제되었습니다."; + } + } + return id + "번 명언은 존재하지 않습니다."; + } + + public String updateProverb(int id, String newProverb, String newAuthor) { + for (Proverb proverb : proverbList) { + if (proverb.getId() == id) { + proverb.setProverb(newProverb); + proverb.setAuthor(newAuthor); + repository.saveProverb(proverb); + return id + "번 명언이 수정되었습니다."; + } + } + return id + "번 명언은 존재하지 않습니다."; + } + + public void saveProverbsToData() { + repository.saveProverbsToData(proverbList); + } +} diff --git a/out/production/code-review/.idea/code-review.iml b/out/production/code-review/.idea/code-review.iml index b107a2d..dce5887 100644 --- a/out/production/code-review/.idea/code-review.iml +++ b/out/production/code-review/.idea/code-review.iml @@ -7,5 +7,21 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/code-review/TDD/Controller/ProverbControllerTest.class b/out/production/code-review/TDD/Controller/ProverbControllerTest.class new file mode 100644 index 0000000000000000000000000000000000000000..50af374585431806074d76ffee16413a6efb7318 GIT binary patch literal 2583 zcmah~Yf}?f7=9Lz#B>o|xkF_^EeW(l>_sl#5U{mP(Q=6uZFLh)VVRJ{-3>GSW(8-c z;*3tmmgy7*XY@lIJ5@)KX_@|j{*>GKkG}w% zKs9Ia7Y3f=c!Sn!pDBg{?Ao@@yVh_p%9OB{m5bvT9W)Mywp35SjA+kM2k01L4 zRHv8b?Ukq2;|PL(36P%WTbXA`Pn zGTmV=pfecB?|InN)#OBvcO>K;@}pM3;STG?f^0pxW&gNtFTa$nAD&wem#uqC_D>7; z?N`>F1?$eE_5kY9;KSP@4xn+9$XP%Ee!h89)DTebCe$~n=)>%KiY4Q$Co~p76PkTE zDB=(f3y?K^B0QC%;vO68Po>CIDmln5-SueZK)fovz{pcYx zkyEUdC6Adn$rB<@;uMig&5SEKk^;Jd=e(xyjuaHMx4;G$mh9CB-VOTDC!!w%0`?fn zEbCWHWkfrxCg?aTf(4U*Os7RmmG&t^OUmiRMSFRJd()mX~uUjt0Z{!RA_D1CdK3Yt@kY$~M#Z-SrvN*97`KYW({ zdC|RQA73-`Gd^=iXV?!r-pV?w$-4WD zER&vp=J-dpS8v!WkKM}x!&*v@v+RO8r*`v(;1ajVsLLQ!Wmh@~BJuwMLxjPx%4u$x{zs@kY9LC@i#gD%4rrqb^dfJUtWmMGNv&Ja zC6rKtMnabfy@{TdW*37-he72|48EiUmvRhZ4uj^c45W9t1nt|CXdx0o5+X!2T3sZX z9TGJ=kr*QqmvbbpI3yajk{}s6BGLzK>-Z>t0$B~h1b>7y=%8ozs0+R!r-5(#Q@BF# zU*+Jhk*NIWWe>d6%|$pKkxmz)aEvH)k`21(K)PKNWQRg6JtW&2;cEiCnxk;pQJ{V+ mg*BXsNM{S7pCa_rs6a27@Qe$+-a)U}3H=(mQ6UCJi2VnwP{x%2 literal 0 HcmV?d00001 diff --git a/out/production/code-review/TDD/Proverb.class b/out/production/code-review/TDD/Proverb.class new file mode 100644 index 0000000000000000000000000000000000000000..41e5355e9351c628f2acbcc4c72ef210cce0b517 GIT binary patch literal 1466 zcma)6*-qO)6g`v0PJ+XdLMWxBl%-9~;_iz=k=h{CNa-Sh=tG|-$p{R_j_e5%f6|ZW zLn{?k;-MeVkE(jdHsF%9;$dd)T%UXIxo2kl>-XtT059>pfE3a?G6u5H7)JN`5w{%f z?pp6#`=Tuwv^CqcO z@1A`uH7`gEVNkuJG#)4+0VBc+9Za*Ww`NI-WAj{2xj;IBFAj=vJrb8mDQdM?zLg zy@hb4t4^y9x)!)j^AznI`ktY6-24G%PM<(GmrqbMS57eYEsVNBbD1K50wITxr>w&$ z(!&|XGSYkr6Rg^UzbDJ^uC!qi3t zh*LAnQhO2YWN`88rQq_w;5p34!Ru5?vC_;XYW1Q^^)~{M$WpxOtQ?`vJJUiX73+n8 zM8+-?nHflAaWIjD+!2vEA~OFEB1%q0ZZ3^` ap@nBIOl~XV!&Q0l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W^PT*h`h_tG-8%b_bNj;)ptijGsB78_;}_nH_MsZ zwly#8sjRT)&AiZ|Asj^u3=J^@tvJfiRUbQMm0jB^m4wZpIYA;r=VX1H!W`Cd3~>z~ z7&wmh{|L;wwplI`is_7!;#pte_suxLaK8HNp7-$e`xiS&@7JH-Z~jnSevqtgKCb?< z?yano?_Tw{KX%u)ytSR=?%JQ#m8I&+?}Ji*r-3eXGw8ffP}MOEr6%|L63`Aediok& z67fR=AK@g!v7&GlqBFX9n->K`durm4tWyR)mO5gN;C6mmB}%;02F^&lSV5G8D-PUz zVjzV+x|ypKcCH)2lelKEKE2(`_*98J@kuMsOLw?! zN?SQ2?zHJJ^fU~|{tyilm@SH?;|ja>zO+g(mlC$&#nD9bId|Hk`HN*;o}c}OR}`O7 zA{>Q6ypf9klGp@8%dA*juD}fUGrV=S2{cP*D3d4$2yEiWVzGOG`z`)uNL|XWCkNX2=>vm`*@j`W0CEZ)o4W zLi8o{=j03FQ+l>i1kj8KqLi=WGqQ{z2cP2$vKYQZx59HMTE_SGzeRihHrk$|b>J=Z z0XjZGQ#`Sm-h$pwX2&Llg%41~kRY;7wD}at07g*|AkO20Puq)&bP8dJ@*@Z(Lgc-K zlS;r9x{(D(B~SM@dL&IyiL4p)L68+Bf}k3F6qhkf_e?I3g1V_{(f1@L>#;fxNY!gt zI!2UKoj#UQDwE5nQ0oQu)`RvOBJipbNZYEQvQ&SBifQp{9XPj*v-My}A1ob&)fBcM z0HaiVc>HhA{pw D8jxDh literal 0 HcmV?d00001 diff --git a/out/production/code-review/TDD/main/ProverbRepository.class b/out/production/code-review/TDD/main/ProverbRepository.class new file mode 100644 index 0000000000000000000000000000000000000000..4c6436327775e0ba2f5f93568b602a2e77917fed GIT binary patch literal 6338 zcmcIod3;pW75;8!CU5fc$TARM2+I&q6B3AQQ4$Ph0T~R5CJ`D@!%OA`29lXLGhxwM zTZ`5jy4aQ$6ZEN>^(*$cK;7saC6tXN00)fWFgdwlZC_WH6|+LkmKm~Q8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-review/TDD/main/ProverbService.class b/out/production/code-review/TDD/main/ProverbService.class new file mode 100644 index 0000000000000000000000000000000000000000..0c7bef340d2bea12a99dd84ba5684ed7b84d795f GIT binary patch literal 4244 zcma)A3wKmk75>g-X6`V#fp$V@hfE+)T9QBr)|N*CsU(052FQyb)Y@J$*JQ|KW_sr) zG*}fWU}R0Sm}W@47W6O+X|bYn2utqb^# z+(Cg*%VfE{+6JljaTNiS3aGJ!7I7@61OipnEtb~1&6(t$D+bMS;fanklt zZZN*dqEc~C#axsN%;?e0t@>+bIAR4GR#3t7(ksWBA0f<_NL30{RfTO`7FZpo5smjW zOkJt&D#k)QrC^bYr}2!y%!$6zk`|%8vZ{i!HuMeEyQFtjDymUKM^f6L?l{6gsw}vi zc|&zqfP5}hQHy0nykG0nn-lSF&D;?+dpSy(THGX9WmRDZtwOh@i_2AfMS|c?Mfd4` zd=<|rcwWT{tjzjso!Fw8z4W<18W-?Xg~QchA65%2&YZiFIrH)T<0F~T{gs*HN5+r5 zS9$-fk<95UT*#a`G=6k={OAYE6g1Gie3IF?H4Q{#5#8`%tw7EA<>C7y*DLEPGiTnp zcX2-l;~yT%yno$aJL#X_k9xcy>G;|t{2VrH?3+|HV?BK)yHfygke0-5RPl8QfQNG7 zh}0ccu^HcB1!&2n9w$km>CkhWZ}4FYjnG|rbelZdDo|TUYu2p-rYFSDEDxbwMF%?V zWL!63_9hI0+1V5?Buxr;sn{Wf{q)&M1s`?_2n(ARReVeC`pkrFN5QuRO7jW0&M>qg zSr~r2gd&**nu^`%=8>qW8yYKGU{2P!RbOFey`dO7zN4T=MK7YP!o1e3h=9_orDQ=7 zm#XSr@2HvO^*}`l|z4EF}d8 zRqVxU^j;oje`3Oy7ZT9is~H^>*W=wftILOdl3WX98T{)iz9(Z*qNxr2Npr}D9|+95 zcX@y2jW;XrUA}nllUp(&Gbavbj$CyTTAur%iUTskyoTP-ekhCfpo&8{Ebw?lkLhN% zY&S+@?0Rly5zAFzX@JdlspRp9ilZ`%{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\274\354\240\234/db/1.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" deleted file mode 100644 index 9391008..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 1, "proverb": "언젠가 오늘은 간다", "author": "박종현1" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" deleted file mode 100644 index 78e015d..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 2, "proverb": "언젠가 내일은 오겠지", "author": "박종현2" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" deleted file mode 100644 index cd67a53..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 3, "proverb": "어제는 왔었네?", "author": "박종현3" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" deleted file mode 100644 index 17aaea0..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 4, "proverb": "하늘은 푸르다", "author": "작자미상" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" deleted file mode 100644 index b58e6b5..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 5, "proverb": "하늘은 어둡다", "author": "작자미상" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" deleted file mode 100644 index 3210d90..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 6, "proverb": "별이 쏟아진다", "author": "작자미상" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" deleted file mode 100644 index 2c048c0..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 7, "proverb": "달이 빛난다", "author": "박종현4" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" deleted file mode 100644 index a790e20..0000000 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 8, "proverb": "매일은 매일우유", "author": "메일우유" } \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" index ce76355..c44dc44 100644 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" @@ -1,42 +1,3 @@ [ - { - "id": 1, - "proverb": "언젠가 오늘은 간다", - "author": "종현1" - }, - { - "id": 2, - "proverb": "언젠가 내일은 오겠지", - "author": "종현2" - }, - { - "id": 3, - "proverb": "어제는 왔었네?", - "author": "종현3" - }, - { - "id": 4, - "proverb": "하늘은 푸르다", - "author": "자미상" - }, - { - "id": 5, - "proverb": "하늘은 어둡다", - "author": "자미상" - }, - { - "id": 6, - "proverb": "별이 쏟아진다", - "author": "자미상" - }, - { - "id": 7, - "proverb": "달이 빛난다", - "author": "종현4" - }, - { - "id": 8, - "proverb": "매일은 매일우유", - "author": "일우유" - } + ] \ No newline at end of file diff --git "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" index f11c82a..56a6051 100644 --- "a/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" +++ "b/out/production/code-review/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" @@ -1 +1 @@ -9 \ No newline at end of file +1 \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" deleted file mode 100644 index 9391008..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/1.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 1, "proverb": "언젠가 오늘은 간다", "author": "박종현1" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" deleted file mode 100644 index 78e015d..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/2.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 2, "proverb": "언젠가 내일은 오겠지", "author": "박종현2" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" deleted file mode 100644 index cd67a53..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/3.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 3, "proverb": "어제는 왔었네?", "author": "박종현3" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" deleted file mode 100644 index 17aaea0..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/4.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 4, "proverb": "하늘은 푸르다", "author": "작자미상" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" deleted file mode 100644 index b58e6b5..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/5.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 5, "proverb": "하늘은 어둡다", "author": "작자미상" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" deleted file mode 100644 index 3210d90..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/6.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 6, "proverb": "별이 쏟아진다", "author": "작자미상" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" deleted file mode 100644 index 2c048c0..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/7.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 7, "proverb": "달이 빛난다", "author": "박종현4" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" deleted file mode 100644 index a790e20..0000000 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/8.json" +++ /dev/null @@ -1 +0,0 @@ -{ "id": 8, "proverb": "매일은 매일우유", "author": "메일우유" } \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" index ce76355..c44dc44 100644 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/data.json" @@ -1,42 +1,3 @@ [ - { - "id": 1, - "proverb": "언젠가 오늘은 간다", - "author": "종현1" - }, - { - "id": 2, - "proverb": "언젠가 내일은 오겠지", - "author": "종현2" - }, - { - "id": 3, - "proverb": "어제는 왔었네?", - "author": "종현3" - }, - { - "id": 4, - "proverb": "하늘은 푸르다", - "author": "자미상" - }, - { - "id": 5, - "proverb": "하늘은 어둡다", - "author": "자미상" - }, - { - "id": 6, - "proverb": "별이 쏟아진다", - "author": "자미상" - }, - { - "id": 7, - "proverb": "달이 빛난다", - "author": "종현4" - }, - { - "id": 8, - "proverb": "매일은 매일우유", - "author": "일우유" - } + ] \ No newline at end of file diff --git "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" index f11c82a..56a6051 100644 --- "a/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" +++ "b/src/\353\257\270\353\213\210\352\263\274\354\240\234/db/lastId.txt" @@ -1 +1 @@ -9 \ No newline at end of file +1 \ No newline at end of file From b24dd9a9ab44603d02030246350086f9bdbba5a0 Mon Sep 17 00:00:00 2001 From: joung-pjh Date: Fri, 20 Dec 2024 17:35:20 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=C3=A3=EB=94=94=EB=A0=89=ED=86=A0=EB=A6=AC?= =?UTF-8?q?=20=EC=A0=95=EB=A6=AC=20=EB=B0=8F=20TDD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TDD/main/{ => controller}/ProverbController.java | 4 +++- TDD/main/{ => repository}/ProverbRepository.java | 2 +- TDD/main/{ => service}/ProverbService.java | 3 ++- TDD/{ => test}/Controller/ProverbControllerTest.java | 4 ++-- TDD/{ => test}/Repository/ProverbRepositoryTest.java | 4 ++-- TDD/{ => test}/Service/ProverbServiceTest.java | 4 ++-- 6 files changed, 12 insertions(+), 9 deletions(-) rename TDD/main/{ => controller}/ProverbController.java (93%) rename TDD/main/{ => repository}/ProverbRepository.java (99%) rename TDD/main/{ => service}/ProverbService.java (97%) rename TDD/{ => test}/Controller/ProverbControllerTest.java (96%) rename TDD/{ => test}/Repository/ProverbRepositoryTest.java (90%) rename TDD/{ => test}/Service/ProverbServiceTest.java (85%) diff --git a/TDD/main/ProverbController.java b/TDD/main/controller/ProverbController.java similarity index 93% rename from TDD/main/ProverbController.java rename to TDD/main/controller/ProverbController.java index 42c518f..375cc18 100644 --- a/TDD/main/ProverbController.java +++ b/TDD/main/controller/ProverbController.java @@ -1,6 +1,8 @@ -package TDD.main; +package TDD.main.controller; +import TDD.main.service.ProverbService; + public class ProverbController { private final ProverbService service; diff --git a/TDD/main/ProverbRepository.java b/TDD/main/repository/ProverbRepository.java similarity index 99% rename from TDD/main/ProverbRepository.java rename to TDD/main/repository/ProverbRepository.java index c9739cd..f7a0c84 100644 --- a/TDD/main/ProverbRepository.java +++ b/TDD/main/repository/ProverbRepository.java @@ -1,4 +1,4 @@ -package TDD.main; +package TDD.main.repository; import TDD.Proverb; diff --git a/TDD/main/ProverbService.java b/TDD/main/service/ProverbService.java similarity index 97% rename from TDD/main/ProverbService.java rename to TDD/main/service/ProverbService.java index 3288cdc..0e54f72 100644 --- a/TDD/main/ProverbService.java +++ b/TDD/main/service/ProverbService.java @@ -1,6 +1,7 @@ -package TDD.main; +package TDD.main.service; import TDD.Proverb; +import TDD.main.repository.ProverbRepository; import java.util.ArrayList; import java.util.List; diff --git a/TDD/Controller/ProverbControllerTest.java b/TDD/test/Controller/ProverbControllerTest.java similarity index 96% rename from TDD/Controller/ProverbControllerTest.java rename to TDD/test/Controller/ProverbControllerTest.java index 7e061c7..0751bcd 100644 --- a/TDD/Controller/ProverbControllerTest.java +++ b/TDD/test/Controller/ProverbControllerTest.java @@ -1,6 +1,6 @@ -package TDD.Controller; +package TDD.test.Controller; -import TDD.main.ProverbController; +import TDD.main.controller.ProverbController; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/TDD/Repository/ProverbRepositoryTest.java b/TDD/test/Repository/ProverbRepositoryTest.java similarity index 90% rename from TDD/Repository/ProverbRepositoryTest.java rename to TDD/test/Repository/ProverbRepositoryTest.java index 2aedf69..aec002e 100644 --- a/TDD/Repository/ProverbRepositoryTest.java +++ b/TDD/test/Repository/ProverbRepositoryTest.java @@ -1,6 +1,6 @@ -package TDD.Repository; +package TDD.test.Repository; -import TDD.main.ProverbRepository; +import TDD.main.repository.ProverbRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/TDD/Service/ProverbServiceTest.java b/TDD/test/Service/ProverbServiceTest.java similarity index 85% rename from TDD/Service/ProverbServiceTest.java rename to TDD/test/Service/ProverbServiceTest.java index f3431ae..1e280d2 100644 --- a/TDD/Service/ProverbServiceTest.java +++ b/TDD/test/Service/ProverbServiceTest.java @@ -1,6 +1,6 @@ -package TDD.Service; +package TDD.test.Service; -import TDD.main.ProverbService; +import TDD.main.service.ProverbService; import org.junit.jupiter.api.Test;