From 81794087f710a0c04b8f7186176b82e11aaaa9fd Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:09:34 +0900 Subject: [PATCH 01/20] =?UTF-8?q?:recycle:=20UserInfoDto=20=EC=9D=98=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=A7=81=EC=A0=91=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94=EC=97=90=EC=84=9C=20constructor=20=EB=A5=BC?= =?UTF-8?q?=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=9E=90=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/application/port/input/dto/UserInfoDto.kt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/UserInfoDto.kt b/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/UserInfoDto.kt index 20fe5fa3..637f6ca9 100644 --- a/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/UserInfoDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/UserInfoDto.kt @@ -5,13 +5,19 @@ import andreas311.miso.domain.user.domain.User import java.util.* data class UserInfoDto( - val id: UUID = UUID.randomUUID(), - val email: String = "", - val role: Role = Role.ROLE_USER + val id: UUID, + val email: String, + val role: Role ) { constructor(user: User) : this( id = user.id, email = user.email, role = user.role ) + + constructor() : this( + id = UUID.randomUUID(), + email = "", + role = Role.ROLE_USER + ) } From ceecb371397b91335c3e61719c1b32960121d0ce Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:09:47 +0900 Subject: [PATCH 02/20] =?UTF-8?q?:recycle:=20PointDto=20=EC=9D=98=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=A7=81=EC=A0=91=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94=EC=97=90=EC=84=9C=20constructor=20=EB=A5=BC?= =?UTF-8?q?=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=9E=90=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miso/domain/user/application/port/input/dto/PointDto.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/PointDto.kt b/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/PointDto.kt index dd21f99f..a7ca3f7c 100644 --- a/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/PointDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/user/application/port/input/dto/PointDto.kt @@ -3,9 +3,13 @@ package andreas311.miso.domain.user.application.port.input.dto import andreas311.miso.domain.user.domain.User data class PointDto( - val point: Int = 0 + val point: Int ) { constructor(user: User) : this( point = user.point ) + + constructor() : this( + point = 0 + ) } From 7538647c3ca55e9dfc94de5168dd325f4cae4eba Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:10:13 +0900 Subject: [PATCH 03/20] =?UTF-8?q?:recycle:=20ItemDto=20=EC=9D=98=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=A7=81=EC=A0=91=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94=EC=97=90=EC=84=9C=20constructor=20=EB=A5=BC?= =?UTF-8?q?=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=9E=90=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../item/application/port/input/dto/ItemDto.kt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ItemDto.kt b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ItemDto.kt index ce758fb1..ec0b0b9f 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ItemDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ItemDto.kt @@ -3,11 +3,11 @@ package andreas311.miso.domain.item.application.port.input.dto import andreas311.miso.domain.item.domain.Item data class ItemDto( - val id: Long = 0L, - val price: Int = 0, - val amount: Int = 0, - val name: String = "", - val imageUrl: String? = "" + val id: Long, + val price: Int, + val amount: Int, + val name: String, + val imageUrl: String? ) { constructor(item: Item) : this( id = item.id, @@ -16,4 +16,12 @@ data class ItemDto( name = item.name, imageUrl = item.imageUrl ) + + constructor() : this( + id = 0L, + price = 0, + amount = 0, + name = "", + imageUrl = null + ) } From 6dbf27f2524fc6d3452c32151f835b2c81ab55fa Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:10:26 +0900 Subject: [PATCH 04/20] =?UTF-8?q?:recycle:=20DetailRecyclablesDto=20?= =?UTF-8?q?=EC=9D=98=20=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=A7=81=EC=A0=91=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=EC=97=90=EC=84=9C=20constructor=20?= =?UTF-8?q?=EB=A5=BC=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=9E=90=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../port/input/dto/DetailRecyclablesDto.kt | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/DetailRecyclablesDto.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/DetailRecyclablesDto.kt index 0917b078..8eeed59f 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/DetailRecyclablesDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/DetailRecyclablesDto.kt @@ -4,15 +4,15 @@ import andreas311.miso.domain.recyclables.domain.Recyclables import andreas311.miso.domain.recyclables.domain.RecyclablesType data class DetailRecyclablesDto( - val id: Long = 0L, - val title: String = "", - val subTitle: String = "", - val recycleMethod: String = "", - val recycleTip: String = "", - val recycleCaution: String = "", - val imageUrl: String? = "", - val recyclablesType: RecyclablesType = RecyclablesType.BAG, - val recycleMark: String = "" + val id: Long, + val title: String, + val subTitle: String, + val recycleMethod: String, + val recycleTip: String, + val recycleCaution: String, + val imageUrl: String?, + val recyclablesType: RecyclablesType, + val recycleMark: String ) { constructor(recyclables: Recyclables) : this( id = recyclables.id, @@ -25,4 +25,16 @@ data class DetailRecyclablesDto( recyclablesType = recyclables.recyclablesType, recycleMark = recyclables.recycleMark ) + + constructor() : this( + id = 0L, + title = "", + subTitle = "", + recycleMethod = "", + recycleTip = "", + recycleCaution = "", + imageUrl = null, + recyclablesType = RecyclablesType.BAG, + recycleMark = "" + ) } From 4d3300a809ee95956173e73990d4b0c70bc1cd6a Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:10:37 +0900 Subject: [PATCH 05/20] =?UTF-8?q?:recycle:=20DetailNotificationDto=20?= =?UTF-8?q?=EC=9D=98=20=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=A7=81=EC=A0=91=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=EC=97=90=EC=84=9C=20constructor=20?= =?UTF-8?q?=EB=A5=BC=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=9E=90=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/port/input/dto/DetailNotificationDto.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/notification/application/port/input/dto/DetailNotificationDto.kt b/src/main/kotlin/andreas311/miso/domain/notification/application/port/input/dto/DetailNotificationDto.kt index e3e7888e..be5d725a 100644 --- a/src/main/kotlin/andreas311/miso/domain/notification/application/port/input/dto/DetailNotificationDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/notification/application/port/input/dto/DetailNotificationDto.kt @@ -3,9 +3,13 @@ package andreas311.miso.domain.notification.application.port.input.dto import andreas311.miso.domain.notification.domain.Notification data class DetailNotificationDto( - val answer: String = "" + val answer: String ) { constructor(notification: Notification) : this( answer = notification.answer ) + + constructor() : this( + answer = "" + ) } From 9c5ca5614bb852186650255eb40f8616ebf0e2f4 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:10:47 +0900 Subject: [PATCH 06/20] =?UTF-8?q?:recycle:=20DetailItemDto=20=EC=9D=98=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=A7=81=EC=A0=91=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94=EC=97=90=EC=84=9C=20constructor=20=EB=A5=BC?= =?UTF-8?q?=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=9E=90=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../port/input/dto/DetailItemDto.kt | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/DetailItemDto.kt b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/DetailItemDto.kt index 8be7a0be..bfc1527b 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/DetailItemDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/DetailItemDto.kt @@ -3,12 +3,12 @@ package andreas311.miso.domain.item.application.port.input.dto import andreas311.miso.domain.item.domain.Item data class DetailItemDto( - val id: Long = 0L, - val price: Int = 0, - val amount: Int = 0, - val name: String = "", - val content: String = "", - val imageUrl: String? = "" + val id: Long, + val price: Int, + val amount: Int, + val name: String, + val content: String, + val imageUrl: String? ) { constructor(item: Item) : this( id = item.id, @@ -18,4 +18,13 @@ data class DetailItemDto( content = item.content, imageUrl = item.imageUrl ) + + constructor() : this( + id = 0, + price = 0, + amount = 0, + name = "", + content = "", + imageUrl = null + ) } From d5956f3851ddbef99c119b4f5a2eefc243b0e2da Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:10:56 +0900 Subject: [PATCH 07/20] =?UTF-8?q?:recycle:=20DetailEnvironmentDto=20?= =?UTF-8?q?=EC=9D=98=20=ED=95=84=EB=93=9C=EB=A5=BC=20=EC=A7=81=EC=A0=91=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=EC=97=90=EC=84=9C=20constructor=20?= =?UTF-8?q?=EB=A5=BC=20=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=9E=90=20=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../port/input/dto/DetailEnvironmentDto.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/andreas311/miso/domain/environment/application/port/input/dto/DetailEnvironmentDto.kt b/src/main/kotlin/andreas311/miso/domain/environment/application/port/input/dto/DetailEnvironmentDto.kt index 802431f9..569fd66a 100644 --- a/src/main/kotlin/andreas311/miso/domain/environment/application/port/input/dto/DetailEnvironmentDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/environment/application/port/input/dto/DetailEnvironmentDto.kt @@ -3,13 +3,19 @@ package andreas311.miso.domain.environment.application.port.input.dto import andreas311.miso.domain.environment.domain.TodayEnvironment data class DetailEnvironmentDto( - val title: String = "", - val content: String = "", - val imageUrl: String? = "" + val title: String, + val content: String, + val imageUrl: String? ) { - constructor(todayEnvironment: TodayEnvironment): this( + constructor(todayEnvironment: TodayEnvironment) : this( title = todayEnvironment.title, content = todayEnvironment.content, imageUrl = todayEnvironment.imageUrl ) + + constructor() : this( + title = "", + content = "", + imageUrl = null + ) } From ad2799ad55b3c708b4b2c0a25d51b6bebdba046e Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 17:58:53 +0900 Subject: [PATCH 08/20] =?UTF-8?q?:recycle:=20RecyclablesDto=20=EC=9D=98=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=EB=A5=BC=20constructor=20=EB=A5=BC=20?= =?UTF-8?q?=ED=86=B5=ED=95=9C=20=EB=B3=B4=EC=A1=B0=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=9E=90=EB=A1=9C=20=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/port/input/dto/RecyclablesDto.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/RecyclablesDto.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/RecyclablesDto.kt index eb4d58ee..6b8308b2 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/RecyclablesDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/RecyclablesDto.kt @@ -15,4 +15,11 @@ data class RecyclablesDto( recycleMethod = recyclables.recycleMethod, recyclablesType = recyclables.recyclablesType ) + + constructor() : this( + title = "", + imageUrl = null, + recycleMethod = "", + recyclablesType = RecyclablesType.BAG + ) } From 08e0382fa507b4f056d87fd7f28d4788ad5f9659 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:00:31 +0900 Subject: [PATCH 09/20] =?UTF-8?q?:recycle:=20ListItemDto=20=EC=97=90=20con?= =?UTF-8?q?structor=20=EB=A5=BC=20=ED=86=B5=ED=95=9C=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/item/application/port/input/dto/ListItemDto.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt index 5f0c36c7..1f1f41af 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt @@ -1,5 +1,7 @@ package andreas311.miso.domain.item.application.port.input.dto data class ListItemDto( - val itemList: List -) + val itemList: List = emptyList() +) { + constructor() : this(emptyList()) +} From 65f750a278cfda0e397989d00effe34d8556b259 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:00:55 +0900 Subject: [PATCH 10/20] =?UTF-8?q?:recycle:=20ListItemDto=20=EC=97=90=20con?= =?UTF-8?q?structor=20=EB=A5=BC=20=ED=86=B5=ED=95=9C=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miso/domain/item/application/port/input/dto/ListItemDto.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt index 1f1f41af..c50dacf7 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/port/input/dto/ListItemDto.kt @@ -1,7 +1,7 @@ package andreas311.miso.domain.item.application.port.input.dto data class ListItemDto( - val itemList: List = emptyList() + val itemList: List ) { constructor() : this(emptyList()) } From 456f06cf6ef5dfeb63c9738cf638aaab512bf5d9 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:01:16 +0900 Subject: [PATCH 11/20] =?UTF-8?q?:recycle:=20ListRecyclablesDto=20?= =?UTF-8?q?=EC=97=90=20constructor=20=EB=A5=BC=20=ED=86=B5=ED=95=9C=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/port/input/dto/ListRecyclablesDto.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/ListRecyclablesDto.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/ListRecyclablesDto.kt index 17b5e611..59df3071 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/ListRecyclablesDto.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/port/input/dto/ListRecyclablesDto.kt @@ -2,4 +2,6 @@ package andreas311.miso.domain.recyclables.application.port.input.dto data class ListRecyclablesDto( val recyclablesList: List -) +) { + constructor() : this(emptyList()) +} From d57ca9cd3d29162646c80a51c068635a108492ef Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:03:37 +0900 Subject: [PATCH 12/20] =?UTF-8?q?:sparkles:=20CreateItemService=20?= =?UTF-8?q?=EC=97=90=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20write=20around=20?= =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miso/domain/item/application/service/CreateItemService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/service/CreateItemService.kt b/src/main/kotlin/andreas311/miso/domain/item/application/service/CreateItemService.kt index 18535ed5..fb0323fd 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/service/CreateItemService.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/service/CreateItemService.kt @@ -6,6 +6,7 @@ import andreas311.miso.domain.item.application.port.input.dto.CreateItemDto import andreas311.miso.domain.item.application.port.output.CommandItemPort import andreas311.miso.domain.item.domain.Item import andreas311.miso.thirdparty.aws.s3.util.S3Util +import org.springframework.cache.annotation.CacheEvict import org.springframework.web.multipart.MultipartFile @RollbackService @@ -13,6 +14,7 @@ class CreateItemService( private val s3Util: S3Util, private val commandItemPort: CommandItemPort ) : CreateItemUseCase { + @CacheEvict(cacheNames = ["itemList"], key = "'itemList'", cacheManager = "redisCacheManager") override fun execute(createItemDto: CreateItemDto, multipartFile: MultipartFile?) { val imageUrl = if (multipartFile != null) { From 43c144bc12377aef20b7f9ffbb24aa3381fc6556 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:03:54 +0900 Subject: [PATCH 13/20] =?UTF-8?q?:sparkles:=20CreateRecyclablesService=20?= =?UTF-8?q?=EC=97=90=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20write=20around=20?= =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recyclables/application/service/CreateRecyclablesService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/CreateRecyclablesService.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/CreateRecyclablesService.kt index f6f18676..74457411 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/CreateRecyclablesService.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/CreateRecyclablesService.kt @@ -6,6 +6,7 @@ import andreas311.miso.domain.recyclables.application.port.input.dto.CreateRecyc import andreas311.miso.domain.recyclables.application.port.output.CommandRecyclablesPort import andreas311.miso.domain.recyclables.domain.Recyclables import andreas311.miso.thirdparty.aws.s3.util.S3Util +import org.springframework.cache.annotation.CacheEvict import org.springframework.web.multipart.MultipartFile @RollbackService @@ -13,6 +14,7 @@ class CreateRecyclablesService( private val s3Util: S3Util, private val commandRecyclablesPort: CommandRecyclablesPort ) : CreateRecyclablesUseCase { + @CacheEvict(cacheNames = ["recyclablesList"], key = "'recyclablesList'", cacheManager = "redisCacheManager") override fun execute(createRecyclablesDto: CreateRecyclablesDto, multipartFile: MultipartFile?) { val imageUrl = if (multipartFile != null) { From cb928e91ef5345d1665ead42017d2f2c48efdaa2 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:04:44 +0900 Subject: [PATCH 14/20] =?UTF-8?q?:sparkles:=20DeleteItemService=20?= =?UTF-8?q?=EC=97=90=20Caching=20=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=EC=9D=84=20=EC=82=AC=EC=9A=A9=ED=95=9C=20write=20arou?= =?UTF-8?q?nd=20=EC=BA=90=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/item/application/service/DeleteItemService.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/service/DeleteItemService.kt b/src/main/kotlin/andreas311/miso/domain/item/application/service/DeleteItemService.kt index 9a2d5b9f..26a3b152 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/service/DeleteItemService.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/service/DeleteItemService.kt @@ -6,13 +6,17 @@ import andreas311.miso.domain.item.application.port.input.DeleteItemUseCase import andreas311.miso.domain.item.application.port.output.CommandItemPort import andreas311.miso.domain.item.application.port.output.QueryItemPort import org.springframework.cache.annotation.CacheEvict +import org.springframework.cache.annotation.Caching @RollbackService class DeleteItemService( private val queryItemPort: QueryItemPort, private val commandItemPort: CommandItemPort ) : DeleteItemUseCase { - @CacheEvict(cacheNames = ["item"], key = "#id", cacheManager = "redisCacheManager") + @Caching(evict = [ + CacheEvict(cacheNames = ["item"], key = "#id", cacheManager = "redisCacheManager"), + CacheEvict(cacheNames = ["itemList"], key = "'itemList'", cacheManager = "redisCacheManager") + ]) override fun execute(id: Long) { val itemEntity = queryItemPort.findByIdOrNull(id) ?: throw ItemNotFoundException() From ca5a188a8c98e73784b3eee31dab90637bb27a5c Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:05:05 +0900 Subject: [PATCH 15/20] =?UTF-8?q?:sparkles:=20DeleteRecyclablesService=20?= =?UTF-8?q?=EC=97=90=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20write=20around=20?= =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recyclables/application/service/DeleteRecyclablesService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/DeleteRecyclablesService.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/DeleteRecyclablesService.kt index de8b397c..6400ecbc 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/DeleteRecyclablesService.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/DeleteRecyclablesService.kt @@ -12,7 +12,7 @@ class DeleteRecyclablesService( private val queryRecyclablesPort: QueryRecyclablesPort, private val commandRecyclablesPort: CommandRecyclablesPort ) : DeleteRecyclablesUseCase { - @CacheEvict(cacheNames = ["recyclables"], key = "#id", cacheManager = "redisCacheManager") + @CacheEvict(cacheNames = ["recyclablesList"], key = "'recyclablesList'", cacheManager = "redisCacheManager") override fun execute(id: Long) { val recyclablesEntity = queryRecyclablesPort.findByIdOrNull(id) ?: throw RecyclablesNotFoundException() From d5431074623580e99d1f11b65e1da9fb31d7df62 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:05:28 +0900 Subject: [PATCH 16/20] =?UTF-8?q?:sparkles:=20EditItemService=20=EC=97=90?= =?UTF-8?q?=20Caching=20=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4=EC=85=98?= =?UTF-8?q?=EC=9D=84=20=EC=82=AC=EC=9A=A9=ED=95=9C=20write=20around=20?= =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miso/domain/item/application/service/EditItemService.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/service/EditItemService.kt b/src/main/kotlin/andreas311/miso/domain/item/application/service/EditItemService.kt index bfe1f044..7d7748c1 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/service/EditItemService.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/service/EditItemService.kt @@ -8,6 +8,7 @@ import andreas311.miso.domain.item.application.port.output.QueryItemPort import andreas311.miso.domain.item.domain.Item import andreas311.miso.thirdparty.aws.s3.util.S3Util import org.springframework.cache.annotation.CacheEvict +import org.springframework.cache.annotation.Caching import org.springframework.stereotype.Component import org.springframework.web.multipart.MultipartFile @@ -17,7 +18,10 @@ class EditItemService( private val queryItemPort: QueryItemPort, private val commandItemPort: CommandItemPort ) : EditItemUseCase { - @CacheEvict(cacheNames = ["item"], key = "#id", cacheManager = "redisCacheManager") + @Caching(evict = [ + CacheEvict(cacheNames = ["item"], key = "#id", cacheManager = "redisCacheManager"), + CacheEvict(cacheNames = ["itemList"], key = "'itemList'", cacheManager = "redisCacheManager") + ]) override fun execute(id: Long, editItemDto: EditItemDto, multipartFile: MultipartFile?) { val item = queryItemPort.findByIdOrNull(id) ?: throw ItemNotFoundException() From 68db02695313ad39b32b0a2739c1e2b7f4523989 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:05:37 +0900 Subject: [PATCH 17/20] =?UTF-8?q?:sparkles:=20EditRecyclablesService=20?= =?UTF-8?q?=EC=97=90=20Caching=20=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=EC=9D=84=20=EC=82=AC=EC=9A=A9=ED=95=9C=20write=20arou?= =?UTF-8?q?nd=20=EC=BA=90=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/service/EditRecyclablesService.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/EditRecyclablesService.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/EditRecyclablesService.kt index b6c0f126..e238e6d5 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/EditRecyclablesService.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/EditRecyclablesService.kt @@ -9,6 +9,7 @@ import andreas311.miso.domain.recyclables.application.port.output.QueryRecyclabl import andreas311.miso.domain.recyclables.domain.Recyclables import andreas311.miso.thirdparty.aws.s3.util.S3Util import org.springframework.cache.annotation.CacheEvict +import org.springframework.cache.annotation.Caching import org.springframework.web.multipart.MultipartFile @RollbackService @@ -17,7 +18,10 @@ class EditRecyclablesService( private val queryRecyclablesPort: QueryRecyclablesPort, private val commandRecyclablesPort: CommandRecyclablesPort ) : EditRecyclablesUseCase { - @CacheEvict(cacheNames = ["recyclables"], key = "#editRecyclablesDto.recyclablesType", cacheManager = "redisCacheManager") + @Caching(evict = [ + CacheEvict(cacheNames = ["recyclables"], key = "#editRecyclablesDto.recyclablesType", cacheManager = "redisCacheManager"), + CacheEvict(cacheNames = ["recyclablesList"], key = "'recyclablesList'", cacheManager = "redisCacheManager") + ]) override fun execute(id: Long, editRecyclablesDto: EditRecyclablesDto, multipartFile: MultipartFile?) { val recyclables = queryRecyclablesPort.findByIdOrNull(id) ?: throw RecyclablesNotFoundException() From 80c17563fcf0b91631115f96839a5e810abb8141 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:06:12 +0900 Subject: [PATCH 18/20] =?UTF-8?q?:recycle:=20JwtExceptionFilter=20?= =?UTF-8?q?=EB=82=B4=20=ED=98=B8=EC=B6=9C=20=ED=95=A8=EC=88=98=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miso/global/security/filter/JwtExceptionFilter.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/kotlin/andreas311/miso/global/security/filter/JwtExceptionFilter.kt b/src/main/kotlin/andreas311/miso/global/security/filter/JwtExceptionFilter.kt index 0fca3696..d9eeb551 100644 --- a/src/main/kotlin/andreas311/miso/global/security/filter/JwtExceptionFilter.kt +++ b/src/main/kotlin/andreas311/miso/global/security/filter/JwtExceptionFilter.kt @@ -26,7 +26,7 @@ class JwtExceptionFilter : OncePerRequestFilter() { val errorCode = when (exception) { is ExpiredJwtException -> ErrorCode.TOKEN_IS_EXPIRED is JwtException, is IllegalArgumentException -> ErrorCode.TOKEN_NOT_VALID - else -> ErrorCode.UNKNOWN_ERROR + else -> ErrorCode.UNKNOWN_ERROR.also { exception.printStackTrace() } } setErrorResponse(errorCode, response) @@ -38,9 +38,6 @@ class JwtExceptionFilter : OncePerRequestFilter() { else -> "Exception" } log.debug("================= [ ExceptionHandlerFilter ] 에서 $debugMessage 발생 ===================") - if (exception is IllegalArgumentException) { - exception.printStackTrace() - } } } } From f375a8aa8e0f5938eac9019e8977b90f1886644f Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:07:07 +0900 Subject: [PATCH 19/20] =?UTF-8?q?:sparkles:=20ListItemService=20=EC=97=90?= =?UTF-8?q?=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20look=20aside=20=EC=BA=90?= =?UTF-8?q?=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miso/domain/item/application/service/ListItemService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/andreas311/miso/domain/item/application/service/ListItemService.kt b/src/main/kotlin/andreas311/miso/domain/item/application/service/ListItemService.kt index a6d64a77..779bba4c 100644 --- a/src/main/kotlin/andreas311/miso/domain/item/application/service/ListItemService.kt +++ b/src/main/kotlin/andreas311/miso/domain/item/application/service/ListItemService.kt @@ -5,11 +5,13 @@ import andreas311.miso.domain.item.application.port.input.ListItemUseCase import andreas311.miso.domain.item.application.port.input.dto.ItemDto import andreas311.miso.domain.item.application.port.input.dto.ListItemDto import andreas311.miso.domain.item.application.port.output.QueryItemPort +import org.springframework.cache.annotation.Cacheable @ReadOnlyRollbackService class ListItemService( private val queryItemPort: QueryItemPort ) : ListItemUseCase { + @Cacheable(cacheNames = ["itemList"], key = "'itemList'", cacheManager = "redisCacheManager") override fun execute(): ListItemDto { return ListItemDto( itemList = queryItemPort.findAll() From 77a7e34e9e657131d1985924c5e8f4c042636436 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 25 Apr 2024 18:07:24 +0900 Subject: [PATCH 20/20] =?UTF-8?q?:sparkles:=20ListRecyclablesService=20?= =?UTF-8?q?=EC=97=90=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20look=20aside=20?= =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EC=A0=84=EB=9E=B5=20=EC=82=AC=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recyclables/application/service/ListRecyclablesService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ListRecyclablesService.kt b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ListRecyclablesService.kt index 8a747453..40303375 100644 --- a/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ListRecyclablesService.kt +++ b/src/main/kotlin/andreas311/miso/domain/recyclables/application/service/ListRecyclablesService.kt @@ -5,11 +5,13 @@ import andreas311.miso.domain.recyclables.application.port.input.ListRecyclables import andreas311.miso.domain.recyclables.application.port.input.dto.ListRecyclablesDto import andreas311.miso.domain.recyclables.application.port.input.dto.RecyclablesDto import andreas311.miso.domain.recyclables.application.port.output.QueryRecyclablesPort +import org.springframework.cache.annotation.Cacheable @ReadOnlyRollbackService class ListRecyclablesService( private val queryRecyclablesPort: QueryRecyclablesPort ) : ListRecyclablesUseCase { + @Cacheable(cacheNames = ["recyclablesList"], key = "'recyclablesList'", cacheManager = "redisCacheManager") override fun execute(): ListRecyclablesDto { return ListRecyclablesDto( recyclablesList = queryRecyclablesPort.findAll()