Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Created by https://www.toptal.com/developers/gitignore/api/java
# Edit at https://www.toptal.com/developers/gitignore?templates=java

.idea/
.gradle/
build/

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
*.DS_Store

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# End of https://www.toptal.com/developers/gitignore/api/java
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# code-review
## 기능 구현
- 등록 / 수정 / 삭제
- 페이징 조회
- author / content 검색
- 빌드 파일 내보내기
---
- db/wiseSaying/create_dummy.sh 샘플 파일 생성
20 changes: 20 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
plugins {
id("java")
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
}

dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.assertj:assertj-core:3.26.3")
}

tasks.test {
useJUnitPlatform()
}
5 changes: 5 additions & 0 deletions db/wiseSaying/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 1,
"author": "Albert Einstein",
"content": "Life is like riding a bicycle. To keep your balance, you must keep moving."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/10.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 10,
"author": "Aristotle",
"content": "Knowing yourself is the beginning of all wisdom."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/11.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 11,
"author": "Maya Angelou",
"content": "You may not control all the events that happen to you, but you can decide not to be reduced by them."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 12,
"author": "John Lennon",
"content": "Life is what happens when you’re busy making other plans."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/13.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 13,
"author": "Vincent Van Gogh",
"content": "I dream my painting and I paint my dream."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/14.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 14,
"author": "Albert Einstein",
"content": "Imagination is more important than knowledge."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/15.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 15,
"author": "Leonardo da Vinci",
"content": "Learning never exhausts the mind."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/16.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 16,
"author": "Yoda",
"content": "Do, or do not. There is no try."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 2,
"author": "Oscar Wilde",
"content": "Be yourself; everyone else is already taken."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 3,
"author": "Nelson Mandela",
"content": "It always seems impossible until it’s done."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 4,
"author": "Mahatma Gandhi",
"content": "Be the change that you wish to see in the world."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 5,
"author": "Steve Jobs",
"content": "Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 6,
"author": "Walt Disney",
"content": "The way to get started is to quit talking and begin doing."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 7,
"author": "Confucius",
"content": "Our greatest glory is not in never falling, but in rising every time we fall."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 8,
"author": "Eleanor Roosevelt",
"content": "The future belongs to those who believe in the beauty of their dreams."
}
5 changes: 5 additions & 0 deletions db/wiseSaying/9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": 9,
"author": "Mark Twain",
"content": "The secret of getting ahead is getting started."
}
36 changes: 36 additions & 0 deletions db/wiseSaying/create_dummy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

create_wise_saying_json() {
local id=$1
local author=$2
local content=$3

echo "{
\"id\": $id,
\"author\": \"$author\",
\"content\": \"$content\"
}" > "$id.json"

echo "Saved: $id.json"
}

create_dummy() {
create_wise_saying_json 1 "Albert Einstein" "Life is like riding a bicycle. To keep your balance, you must keep moving."
create_wise_saying_json 2 "Oscar Wilde" "Be yourself; everyone else is already taken."
create_wise_saying_json 3 "Nelson Mandela" "It always seems impossible until it’s done."
create_wise_saying_json 4 "Mahatma Gandhi" "Be the change that you wish to see in the world."
create_wise_saying_json 5 "Steve Jobs" "Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work."
create_wise_saying_json 6 "Walt Disney" "The way to get started is to quit talking and begin doing."
create_wise_saying_json 7 "Confucius" "Our greatest glory is not in never falling, but in rising every time we fall."
create_wise_saying_json 8 "Eleanor Roosevelt" "The future belongs to those who believe in the beauty of their dreams."
create_wise_saying_json 9 "Mark Twain" "The secret of getting ahead is getting started."
create_wise_saying_json 10 "Aristotle" "Knowing yourself is the beginning of all wisdom."
create_wise_saying_json 11 "Maya Angelou" "You may not control all the events that happen to you, but you can decide not to be reduced by them."
create_wise_saying_json 12 "John Lennon" "Life is what happens when you’re busy making other plans."
create_wise_saying_json 13 "Vincent Van Gogh" "I dream my painting and I paint my dream."
create_wise_saying_json 14 "Albert Einstein" "Imagination is more important than knowledge."
create_wise_saying_json 15 "Leonardo da Vinci" "Learning never exhausts the mind."
create_wise_saying_json 16 "Yoda" "Do, or do not. There is no try."
}

create_dummy
1 change: 1 addition & 0 deletions db/wiseSaying/lastId.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading