-
Notifications
You must be signed in to change notification settings - Fork 0
[#3] Zero #10
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
zozero94
wants to merge
5
commits into
review/kotlin
Choose a base branch
from
zero
base: review/kotlin
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
[#3] Zero #10
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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 hidden or 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
This file contains hidden or 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,8 @@ | ||
| ## This file must *NOT* be checked into Version Control Systems, | ||
| # as it contains information specific to your local configuration. | ||
| # | ||
| # Location of the SDK. This is only used by Gradle. | ||
| # For customization when using a Version Control System, please read the | ||
| # header note. | ||
| #Thu Aug 20 19:53:31 KST 2020 | ||
| sdk.dir=/Users/zero/Library/Android/sdk | ||
This file contains hidden or 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
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/com/example/kotlinweb/config/BoardConfig.kt
This file contains hidden or 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,14 @@ | ||
| package com.example.kotlinweb.config | ||
|
|
||
| import com.example.kotlinweb.model.Board | ||
| import org.springframework.context.annotation.Bean | ||
| import org.springframework.context.annotation.Configuration | ||
|
|
||
| @Configuration | ||
| class BoardConfig { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 배운 걸 잘 응용하셨네요 굿
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 꾸오오옹 아직은 잘 모르겠습니다 해리 감사해요 👍 |
||
|
|
||
| @Bean | ||
| fun boardList(): MutableList<Board> { | ||
| return mutableListOf() | ||
| } | ||
| } | ||
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/com/example/kotlinweb/controller/BoardController.kt
This file contains hidden or 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,16 @@ | ||
| package com.example.kotlinweb.controller | ||
|
|
||
| import com.example.kotlinweb.model.Board | ||
| import com.example.kotlinweb.service.BoardService | ||
| import org.springframework.web.bind.annotation.PostMapping | ||
| import org.springframework.web.bind.annotation.RequestBody | ||
| import org.springframework.web.bind.annotation.RestController | ||
|
|
||
| @RestController | ||
| class BoardController(private val boardService: BoardService) { | ||
|
|
||
| @PostMapping("/board") | ||
| fun postBoard(@RequestBody body: Board): Boolean { | ||
| return boardService.create(body) | ||
| } | ||
| } |
17 changes: 0 additions & 17 deletions
17
src/main/kotlin/com/example/kotlinweb/controller/HealthController.kt
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,8 @@ | ||
| package com.example.kotlinweb.model | ||
|
|
||
| data class Board( | ||
| val id: Int, | ||
| val title: String, | ||
| val name: String, | ||
| val content: String | ||
| ) |
15 changes: 15 additions & 0 deletions
15
src/main/kotlin/com/example/kotlinweb/service/BoardService.kt
This file contains hidden or 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,15 @@ | ||
| package com.example.kotlinweb.service | ||
|
|
||
| import com.example.kotlinweb.model.Board | ||
| import org.springframework.stereotype.Service | ||
|
|
||
| @Service | ||
| class BoardService( | ||
| private val boardList: MutableList<Board> | ||
| ) { | ||
| fun create(board: Board): Boolean { | ||
| boardList.add(board) | ||
| println("Board 생성 :$board") | ||
| return true | ||
| } | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
|
|
||
| server.port = 5050 |
This file contains hidden or 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
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.
안드로이드는 이거 필요해요..??? 궁금궁금
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.
헤카앱 안드로이드같은 경우는 기본 sdk 로 자바 8을 쓰고있어서 해당 경로가 기입된것 같습니다 ㅇㅅㅇ...