Skip to content

Commit

Permalink
📝 ::
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdl0525 committed Dec 7, 2023
1 parent a593834 commit 6da2aba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import org.springframework.web.bind.annotation.*
import java.time.LocalDate
import java.time.format.DateTimeParseException
import java.util.*
import javax.validation.constraints.Min
import javax.validation.constraints.NotBlank
import javax.validation.constraints.NotNull

@Validated
@RestController
Expand All @@ -22,9 +25,9 @@ class TimelineController(

@GetMapping
fun getByDate(
@RequestParam("idx", required = true) idx: Int = 0,
@RequestParam("size", required = true) size: Int = 5,
@RequestParam("date", required = true) date: String
@RequestParam("idx", required = true) @NotNull idx: Int = 0,
@RequestParam("size", required = true) @NotNull @Min(1) size: Int = 5,
@RequestParam("date", required = true) @NotBlank date: String
) = try {
timelineService.searchByDate(idx, size, LocalDate.parse(date))
} catch (e: DateTimeParseException) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.example.onui.global.config.querydsl

import com.querydsl.jpa.impl.JPAQueryFactory

import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

import javax.persistence.EntityManager
import javax.persistence.PersistenceContext

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ spring:
properties:
hibernate:
format_sql: false
show_sql: true
use_sql_comments: false
show_sql: false
use_sql_comments: true
open-in-view: false

# server
Expand Down

0 comments on commit 6da2aba

Please sign in to comment.