🎨 GetNoticesCommand validation 설정 추가

This commit is contained in:
jini
2023-03-31 02:51:50 +09:00
parent 02553cdec7
commit 59cf934058
3 changed files with 8 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
package me.jiniworld.demohx.application.notice.port.input
import javax.validation.constraints.Min
data class GetNoticesCommand(
val page: Int,
val size: Int,
@Min(0) val page: Int,
@Min(5) val size: Int,
)

View File

@@ -6,8 +6,10 @@ import me.jiniworld.demohx.annotation.WebAdapter
import me.jiniworld.demohx.application.notice.port.input.GetNoticeQuery
import me.jiniworld.demohx.application.notice.port.input.GetNoticesCommand
import me.jiniworld.demohx.model.NotFoundException
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.*
@Validated
@WebAdapter
@Tag(name = "setting-system", description = "설정-시스템(공지사항, FAQ, 이용약관, 메타정보 등)")
@RestController

View File

@@ -6,8 +6,10 @@ import me.jiniworld.demohx.annotation.WebAdapter
import me.jiniworld.demohx.application.notice.port.input.GetNoticeQuery
import me.jiniworld.demohx.application.notice.port.input.GetNoticesCommand
import me.jiniworld.demohx.model.NotFoundException
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.*
@Validated
@WebAdapter
@Tag(name = "setting-system", description = "설정-시스템(공지사항, FAQ, 이용약관, 메타정보 등)")
@RestController