-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
170 additions
and
128 deletions.
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
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 |
---|---|---|
@@ -1,51 +1,52 @@ | ||
plugins { | ||
kotlin("jvm") version "1.9.25" | ||
kotlin("plugin.spring") version "1.9.25" | ||
id("org.springframework.boot") version "3.4.1" | ||
id("io.spring.dependency-management") version "1.1.7" | ||
kotlin("plugin.jpa") version "1.9.25" | ||
kotlin("jvm") version "1.9.25" | ||
kotlin("plugin.spring") version "1.9.25" | ||
id("org.springframework.boot") version "3.4.1" | ||
id("io.spring.dependency-management") version "1.1.7" | ||
id("org.jlleitschuh.gradle.ktlint") version "11.5.1" | ||
kotlin("plugin.jpa") version "1.9.25" | ||
} | ||
|
||
group = "com.wafflestudio.toyproject" | ||
version = "0.0.1-SNAPSHOT" | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.springframework.boot:spring-boot-starter") | ||
implementation("org.springframework.boot:spring-boot-starter-data-jpa") | ||
implementation("org.springframework.boot:spring-boot-starter-web") | ||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin") | ||
implementation("org.jetbrains.kotlin:kotlin-reflect") | ||
implementation("org.mindrot:jbcrypt:0.4") | ||
implementation("com.mysql:mysql-connector-j:8.2.0") | ||
implementation("io.jsonwebtoken:jjwt-api:0.11.5") | ||
implementation("io.jsonwebtoken:jjwt-impl:0.11.5") | ||
implementation("io.jsonwebtoken:jjwt-jackson:0.11.5") | ||
implementation("org.springframework.boot:spring-boot-starter-oauth2-client") | ||
testImplementation("org.springframework.boot:spring-boot-starter-test") | ||
implementation("org.springframework.boot:spring-boot-starter") | ||
implementation("org.springframework.boot:spring-boot-starter-data-jpa") | ||
implementation("org.springframework.boot:spring-boot-starter-web") | ||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin") | ||
implementation("org.jetbrains.kotlin:kotlin-reflect") | ||
implementation("org.mindrot:jbcrypt:0.4") | ||
implementation("com.mysql:mysql-connector-j:8.2.0") | ||
implementation("io.jsonwebtoken:jjwt-api:0.11.5") | ||
implementation("io.jsonwebtoken:jjwt-impl:0.11.5") | ||
implementation("io.jsonwebtoken:jjwt-jackson:0.11.5") | ||
implementation("org.springframework.boot:spring-boot-starter-oauth2-client") | ||
testImplementation("org.springframework.boot:spring-boot-starter-test") | ||
} | ||
|
||
kotlin { | ||
compilerOptions { | ||
freeCompilerArgs.addAll("-Xjsr305=strict") | ||
} | ||
compilerOptions { | ||
freeCompilerArgs.addAll("-Xjsr305=strict") | ||
} | ||
} | ||
|
||
allOpen { | ||
annotation("jakarta.persistence.Entity") | ||
annotation("jakarta.persistence.MappedSuperclass") | ||
annotation("jakarta.persistence.Embeddable") | ||
annotation("jakarta.persistence.Entity") | ||
annotation("jakarta.persistence.MappedSuperclass") | ||
annotation("jakarta.persistence.Embeddable") | ||
} | ||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
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
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
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/memo/persistence/MemoEntity.kt
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,3 @@ | ||
package com.wafflestudio.toyproject.memoWithTags.memo.persistence | ||
|
||
class MemoEntity |
6 changes: 6 additions & 0 deletions
6
src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/memo/service/MemoService.kt
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,6 @@ | ||
package com.wafflestudio.toyproject.memoWithTags.memo.service | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class MemoService |
51 changes: 51 additions & 0 deletions
51
src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/controller/TagController.kt
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,51 @@ | ||
package com.wafflestudio.toyproject.memoWithTags.tag.controller | ||
|
||
import com.wafflestudio.toyproject.memoWithTags.tag.service.TagService | ||
import org.springframework.web.bind.annotation.DeleteMapping | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.PathVariable | ||
import org.springframework.web.bind.annotation.PostMapping | ||
import org.springframework.web.bind.annotation.PutMapping | ||
import org.springframework.web.bind.annotation.RequestBody | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@RestController | ||
class TagController( | ||
private val tagService: TagService | ||
) { | ||
@GetMapping("/api/v1/tag") | ||
fun getTags(): List<TagDto> { | ||
return emptyList() // 빈 리스트 반환 | ||
} | ||
|
||
@PostMapping("/api/v1/tag") | ||
fun createTag(@RequestBody request: CreateTagRequest): TagDto { | ||
return TagDto(0L, "", "") // 기본값으로 TagDto 반환 | ||
} | ||
|
||
@PutMapping("/api/v1/tag/{tagId}") | ||
fun updateTag(@PathVariable id: Long, @RequestBody request: UpdateTagRequest): TagDto { | ||
return TagDto(0L, "", "") // 기본값으로 TagDto 반환 | ||
} | ||
|
||
@DeleteMapping("/api/v1/tag/{tagId}") | ||
fun deleteTag(@PathVariable id: Long) { | ||
// 반환 타입이 Unit이므로 아무 작업 없이 비워 둬도 OK | ||
} | ||
} | ||
|
||
data class TagDto( | ||
val id: Long, | ||
val name: String, | ||
val color: String | ||
) | ||
|
||
data class CreateTagRequest( | ||
val name: String, | ||
val color: String | ||
) | ||
|
||
data class UpdateTagRequest( | ||
val name: String, | ||
val color: String | ||
) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/persistence/TagEntity.kt
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,3 @@ | ||
package com.wafflestudio.toyproject.memoWithTags.tag.persistence | ||
|
||
class TagEntity |
6 changes: 6 additions & 0 deletions
6
src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt
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,6 @@ | ||
package com.wafflestudio.toyproject.memoWithTags.tag.service | ||
|
||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class TagService |
25 changes: 14 additions & 11 deletions
25
...ith_tags/user/contoller/UserController.kt → ...WithTags/user/contoller/UserController.kt
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
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/user/persistence/UserEntity.kt
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,3 @@ | ||
package com.wafflestudio.toyproject.memoWithTags.user.persistence | ||
|
||
class UserEntity |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/user/service/UserService.kt
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,3 @@ | ||
package com.wafflestudio.toyproject.memoWithTags.user.service | ||
|
||
class UserService |
7 changes: 0 additions & 7 deletions
7
src/main/kotlin/com/wafflestudio/toyproject/memo_with_tags/memo/persistence/MemoEntity.kt
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/main/kotlin/com/wafflestudio/toyproject/memo_with_tags/memo/service/MemoService.kt
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
src/main/kotlin/com/wafflestudio/toyproject/memo_with_tags/tag/controller/TagController.kt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
src/main/kotlin/com/wafflestudio/toyproject/memo_with_tags/tag/persistence/TagEntity.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.