Skip to content

Commit

Permalink
fix: 오타
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaisqls committed Oct 4, 2023
1 parent 67383a9 commit 27e90a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package kr.hs.dsm.inq.domain.question.persistence.repository

import java.awt.print.Pageable
import kr.hs.dsm.inq.domain.question.persistence.Category
import kr.hs.dsm.inq.domain.question.persistence.Tags
import org.springframework.data.domain.PageRequest
import org.springframework.data.repository.CrudRepository

interface TagsRepository : CrudRepository<Tags, Long> {
fun findByCategoryAndTagIn(category: Category, tagList: List<String>): List<Tags>
fun findTop15ByCategory(category: Category): List<Tags>
fun findTop15(): List<Tags>
fun findByCategory(category: Category, pageable: Pageable = PageRequest.of(0, 15) as Pageable): List<Tags>
fun findAllBy(pageable: Pageable = PageRequest.of(0, 15) as Pageable): List<Tags>
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ class QuestionService(
fun getTagList(category: Category?): TagListResponse {

val tagList = category?.let {
tagsRepository.findTop15ByCategory(it)
} ?: tagsRepository.findTop15()
tagsRepository.findByCategory(it)
} ?: tagsRepository.findAllBy()

return TagListResponse(
tagList = tagList.map { it.tag }
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ server:

spring:
datasource:
url: jdbc:mysql://{DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:inq}?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&tinyInt1isBit=false&rewriteBatchedStatements=true
url: jdbc:mysql://${DB_HOST:43.200.116.136}:${DB_PORT:3306}/${DB_NAME:inq}?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&tinyInt1isBit=false&rewriteBatchedStatements=true
username: ${MYSQL_USERNAME:root}
password: ${MYSQL_PASSWORD:Cjve94uWhd7UWUt}
password: ${MYSQL_PASSWORD:inqdbpassword}
driver-class-name: com.mysql.cj.jdbc.Driver

jpa:
Expand Down

0 comments on commit 27e90a2

Please sign in to comment.