Skip to content

[박준한] sprint 4 #242

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
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
71 changes: 59 additions & 12 deletions .github/pull-request-template.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,67 @@
## 요구사항

### 기본
- [x] 기본 항목 1
- [ ] 기본 항목 2

### 심화
- [ ] 심화 항목 1
- [ ] 심화 항목 2
프로젝트 초기화

## 주요 변경사항
-
-
- [x] IntelliJ를 통해 다음의 조건으로 Java 프로젝트를 생성합니다.
- [x] IntelliJ에서 제공하는 프로젝트 템플릿 중 Java를 선택합니다.
- [x] 프로젝트의 경로는 스프린트 미션 리포지토리의 경로와 같게 설정합니다.
- [x] Create Git Repository 옵션은 체크하지 않습니다.
- [x] Build system은 Gradle을 사용합니다. Gradle DSL은 Groovy를 사용합니다.
- [x] JDK 17을 선택합니다.
- [x] GroupId는 com.sprint.mission로 설정합니다.
- [x] ArtifactId는 수정하지 않습니다.
- [x] .gitignore에 IntelliJ와 관련된 파일이 형상관리 되지 않도록 .idea디렉토리를 추가합니다.

## 스크린샷
![image](이미지url)
도메인 모델링

- [x] 디스코드 서비스를 활용해보면서 각 도메인 모델에 필요한 정보를 도출하고, Java Class로 구현하세요.
- [x] 패키지명: com.sprint.mission.discodeit.entity
- [x] 도메인 모델 정의
- [x] 공통
- [x] id: 객체를 식별하기 위한 id로 UUID 타입으로 선언합니다.
- [x] createdAt, updatedAt: 각각 객체의 생성, 수정 시간을 유닉스 타임스탬프로 나타내기 위한 필드로 Long 타입으로 선언합니다.
- [x] User
- [x] Channel
- [x] Message
- [x] 생성자
- [x] id는 생성자에서 초기화하세요.
- [x] createdAt는 생성자에서 초기화하세요.
- [x] id, createdAt, updatedAt을 제외한 필드는 생성자의 파라미터를 통해 초기화하세요.
- [x] 메소드
- [x] 각 필드를 반환하는 Getter 함수를 정의하세요.
- [x] 필드를 수정하는 update 함수를 정의하세요.

서비스 설계 및 구현

- [x] 도메인 모델 별 CRUD(생성, 읽기, 모두 읽기, 수정, 삭제) 기능을 인터페이스로 선언하세요.
- [x] 인터페이스 패키지명: com.sprint.mission.discodeit.service
- [x] 인터페이스 네이밍 규칙: [도메인 모델 이름]Service
- [x] 다음의 조건을 만족하는 서비스 인터페이스의 구현체를 작성하세요.
- [x] 클래스 패키지명: com.sprint.mission.discodeit.service.jcf
- [x] 클래스 네이밍 규칙: JCF[인터페이스 이름]
- [x] Java Collections Framework를 활용하여 데이터를 저장할 수 있는 필드(data)를 final로 선언하고 생성자에서 초기화하세요.
- [x] data 필드를 활용해 생성, 조회, 수정, 삭제하는 메소드를 구현하세요.

메인 클래스 구현

- [x] 메인 메소드가 선언된 JavaApplication 클래스를 선언하고, 도메인 별 서비스 구현체를 테스트해보세요.
- [x] 등록
- [x] 조회(단건, 다건)
- [x] 수정
- [x] 수정된 데이터 조회
- [x] 삭제
- [x] 조회를 통해 삭제되었는지 확인


## 스크린샷
[User CRUD Results]
![IMG_4673](https://github.com/user-attachments/assets/046328f8-0b6d-41e0-a32d-6905170aa34f)
[Channel CRUD Results]
![IMG_4675](https://github.com/user-attachments/assets/19751bb9-36c1-4510-887f-c420709dd302)
[Message CRUD Results]
![IMG_4670](https://github.com/user-attachments/assets/17f6c010-a829-4df9-a31e-3e7346dd45c1)
## 멘토에게
- 셀프 코드 리뷰를 통해 질문 이어가겠습니다.
-
- Message 클래스에 update 메소드를 JCFMessageService클래스에서 content가 UUID 타입으로 받아져서 두번 써서 해결했는데 괜찮은건지 궁금합니다
- 셀프 코드 리뷰를 통해 질문 이어가겠습니다.
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.idea

.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
22 changes: 22 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Gradle documentation](https://docs.gradle.org)
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/3.4.0/gradle-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.4.0/gradle-plugin/packaging-oci-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/3.4.0/reference/web/servlet.html)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)

### Additional Links
These additional references should also help you:

* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Spring 백엔드 트랙 1기 스프린트 미션 제출 리포지토리
# 0-spring-mission
스프린트 미션 모범 답안 리포지토리입니다.
36 changes: 36 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
}

group = 'com.sprint.mission'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
useJUnitPlatform()
}
Loading