-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5기 김용상, 임수진] Spring Boot JPA 게시판 구현 미션 제출합니다. #268
Open
suzzingV
wants to merge
11
commits into
prgrms-be-devcourse:suzzingv
Choose a base branch
from
suzzingV:main
base: suzzingv
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
14d6656
feat : controller, dto 생성
suzzingV d6e5a87
feat : service 구현
suzzingV 4ed8af7
feat : users 구현
suzzingV 44ebdb0
feat : paginaition 구현
suzzingV bd51c4b
docs : rest docs
suzzingV 26425ed
feat : validation, exception
suzzingV e82c9e4
fix
suzzingV a1873e8
fix
suzzingV e8a03d1
refactor: toEntity 위치 변경
YongNyeo 792c60d
test: 불필요한 코드 삭제
YongNyeo 917c3ca
chore: docker-compose 파일 추가
YongNyeo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
HELP.md | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
.gradle/ | ||
.idea/ | ||
build/ | ||
gradle/ | ||
logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
plugins { | ||
id 'java' | ||
id 'org.springframework.boot' version '3.1.5' | ||
id 'io.spring.dependency-management' version '1.1.3' | ||
id 'org.asciidoctor.jvm.convert' version '3.3.2' | ||
|
||
} | ||
|
||
group = 'com.example' | ||
version = '0.0.1-SNAPSHOT' | ||
|
||
java { | ||
sourceCompatibility = '17' | ||
} | ||
|
||
configurations { | ||
compileOnly { | ||
extendsFrom annotationProcessor | ||
} | ||
asciidoctorExt | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
compileOnly 'org.projectlombok:lombok' | ||
runtimeOnly 'com.mysql:mysql-connector-j' | ||
annotationProcessor 'org.projectlombok:lombok' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor' | ||
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc' | ||
implementation 'org.springframework.boot:spring-boot-starter-validation' | ||
} | ||
|
||
ext { | ||
snippetsDir = file('build/generated-snippets') | ||
} | ||
|
||
asciidoctor { | ||
inputs.dir snippetsDir | ||
configurations 'asciidoctorExt' | ||
dependsOn test | ||
} | ||
|
||
asciidoctor.doFirst { | ||
delete file("src/main/resources/static/docs") | ||
} | ||
|
||
bootJar { | ||
dependsOn asciidoctor | ||
from("${asciidoctor.outputDir}/html5") { | ||
into 'static/docs' | ||
} | ||
} | ||
|
||
task copyDocument(type: Copy) { | ||
dependsOn asciidoctor | ||
from file("$buildDir/docs/asciidoc") | ||
into file("src/main/resources/static/docs") | ||
} | ||
|
||
build { | ||
dependsOn copyDocument | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
outputs.dir snippetsDir | ||
} | ||
|
||
|
||
|
||
tasks.named('bootBuildImage') { | ||
builder = 'paketobuildpacks/builder-jammy-base:latest' | ||
} | ||
|
||
tasks.named('test') { | ||
useJUnitPlatform() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3' | ||
|
||
services: | ||
mysql: | ||
image: mysql:latest | ||
container_name: board | ||
environment: | ||
MYSQL_ROOT_PASSWORD: | ||
MYSQL_DATABASE: board | ||
MYSQL_CHARSET: utf8mb4 | ||
MYSQL_COLLATION: utf8mb4_unicode_ci | ||
ports: | ||
- "3307:3306" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restdocs 관련된 설정들이 보여지는데, 어떤 것들인지 소개 해주실수 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plugins {
id 'org.asciidoctor.jvm.convert' version '3.3.2'
}
: AsciiDoc 파일을 다른 형식으로 변환하는 기능을 제공하는 기능입니다.
ext {
snippetsDir = file('build/generated-snippets')
}
: Gradle 빌드 스크립트에서 ext 블록을 사용하여 snippetsDir라는 확장 속성을 정의하는 부분입니다. 코드 스니펫, 테스트 결과 또는 문서의 일부 등이 여기에 저장될 수 있습니다.
asciidoctor {
inputs.dir snippetsDir
configurations 'asciidoctorExt'
dependsOn test
}
: asciidoctor는 AsciiDoctor 플러그인의 설정 블록을 지칭합니다.
inputs.dir snippetsDir: 여기서 snippetsDir은 앞서 정의한 디렉토리 경로를 참조하며, AsciiDoctor에게 입력으로 제공될 디렉토리를 설정합니다. AsciiDoctor 변환 작업에 이 디렉토리의 내용이 사용됩니다.
configurations 'asciidoctorExt': 구성(configuration)을 설정합니다. AsciiDoctor 플러그인의 추가적인 확장 기능을 위한 설정입니다.
dependsOn test: 현재 설정된 작업이 테스트 작업(test)에 종속되어 있다는 것을 나타냅니다.
asciidoctor.doFirst {
delete file("src/main/resources/static/docs")
}
: doFirst는 특정 작업이 실행되기 전에 수행할 작업을 정의하는 Gradle의 메서드입니다. delete file("src/main/resources/static/docs")는 src/main/resources/static/docs 경로에 있는 파일 또는 디렉토리를 삭제하는 명령어입니다. 이 코드는 AsciiDoctor 변환 작업을 실행하기 전에 해당 경로에 있는 파일이나 디렉토리를 삭제하도록 합니다.
bootJar {
dependsOn asciidoctor
from("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
}
: bootJar는 Spring Boot 애플리케이션을 JAR 파일로 패키징하는 작업을 정의하는 부분입니다.
dependsOn asciidoctor: bootJar 작업이 asciidoctor 작업에 종속되어 있다는 것을 나타냅니다. 따라서 asciidoctor 작업이 먼저 실행된 후에 bootJar 작업이 실행됩니다.
from("${asciidoctor.outputDir}/html5"): AsciiDoctor의 출력 디렉토리에서 HTML5로 된 결과물을 가져오도록 설정합니다.
into 'static/docs': 가져온 HTML5 결과물을 static/docs 디렉토리에 넣도록 설정하고 있습니다.
task copyDocument(type: Copy) {
dependsOn asciidoctor
from file("$buildDir/docs/asciidoc")
into file("src/main/resources/static/docs")
}
: Copy 유형의 작업으로 정의되어 있으며, 다른 작업인 asciidoctor에 의존하고 있습니다. dependsOn asciidoctor 라인은 asciidoctor 작업이 먼저 실행된 후에 copyDocument 작업이 실행되어야 함을 의미합니다. AsciiDoc 문서가 있는 디렉토리("$buildDir/docs/asciidoc")에서 파일을 가져와서(from) src/main/resources/static/docs 디렉토리로 복사(into)하는 것으로 보입니다.
build {
dependsOn copyDocument
}
: build 단계가 copyDocument 작업이 완료된 후에 실행될 것임을 의미합니다.
test {
useJUnitPlatform()
outputs.dir snippetsDir
}
: outputs.dir snippetsDir는 테스트 작업이 완료된 후 생성된 결과물이나 출력물을 snippetsDir 디렉토리로 저장하도록 합니다. snippetsDir은 출력 디렉토리를 나타내며, 테스트가 생성하는 어떤 산출물을 저장하는 데 사용됩니다.