Skip to content

Commit

Permalink
Merge pull request #9 from dlgocks1/develop
Browse files Browse the repository at this point in the history
merge to release
  • Loading branch information
dlgocks1 authored Nov 15, 2023
2 parents 2643972 + 4a8bcfd commit 4bb9af5
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 11 deletions.
16 changes: 16 additions & 0 deletions .gitmessage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


#########
# 커밋 타입 : 내용 (이슈 링크)
# Ex) feat : add adid filtering (nlad-tf/addev1-Flyer-DPA-issues#874)

#########
# Commit Info
# feat : 새로운 기능 추가
# fix : 버그 수정
# docs : 문서 수정
# test : 테스트 코드 추가
# refactor : 코드 리팩토링
# style : 코드 의미에 영향을 주지 않는 변경
# chore : 빌드 부분 혹은 패키지 매니저 수정

Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ class CocktailController(
): CommonResponse<List<Cocktail>> {
return CommonResponse.onSuccess(cocktailService.queryCocktail(query))
}

@GetMapping("/cache-reload")
@Operation(summary = "칵테일 캐시 수동 리로드)")
fun reloadCocktail(): CommonResponse<String> {
return CommonResponse.onSuccess(cocktailService.reloadCocktail())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ class CocktailService(
contents = content
)
}

fun reloadCocktail(): String {
cacheService.reloadCocktails()
return "캐시 리로드 성공"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.falco.cocktaildakkapi.recommand.controller

import com.falco.cocktaildakkapi.recommand.dto.KeywordRecommandRes
import com.falco.cocktaildakkapi.recommand.service.RecommandService
import com.falco.cocktaildakkcommon.model.CommonResponse
import com.falco.cocktaildakkdomain.cocktail.model.Cocktail
import com.falco.cocktaildakkdomain.user.model.User
import org.springframework.security.core.annotation.AuthenticationPrincipal
Expand All @@ -16,22 +17,23 @@ class RecommandController(
) {

@GetMapping("/dynamic")
fun getDynamicRecommand(@AuthenticationPrincipal user: User): List<Cocktail> {
return recommandService.getDynamicRecommand(user)
fun getDynamicRecommand(@AuthenticationPrincipal user: User): CommonResponse<List<Cocktail>> {
return CommonResponse.onSuccess(recommandService.getDynamicRecommand(user))
}

@GetMapping("/random")
fun getRandomReccommand(): List<Cocktail> = recommandService.randomRecommand()
fun getRandomReccommand(): CommonResponse<List<Cocktail>> =
CommonResponse.onSuccess(recommandService.randomRecommand())

@GetMapping("/keyword")
fun getKeywordReccommand(
@AuthenticationPrincipal user: User,
): KeywordRecommandRes = recommandService.keywordRecommand(user)
): CommonResponse<KeywordRecommandRes> = CommonResponse.onSuccess(recommandService.keywordRecommand(user))

@GetMapping("/base")
fun getBaseReccommand(
@AuthenticationPrincipal user: User,
): KeywordRecommandRes = recommandService.baseRecommand(user)
): CommonResponse<KeywordRecommandRes> = CommonResponse.onSuccess(recommandService.baseRecommand(user))

}

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import org.springframework.test.context.ActiveProfiles
import java.io.File

@SpringBootTest
@ActiveProfiles(profiles = ["local"])
@ActiveProfiles(profiles = ["dev"])
//@ContextConfiguration(locations = ["classpath:WEB-INF/application-common.xml"])
class CocktailUploadBatche {
class CocktailUploadBatch {

@Autowired
private lateinit var cocktailRepository: CocktailRepository
Expand Down
2 changes: 1 addition & 1 deletion Cocktaildakk-Common/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spring:
password: ENC(msu6yFfOUrDYhxA117PjOIPp6K5wwUR4)
jpa:
hibernate:
ddl-auto: create
ddl-auto: update
naming:
implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spring:
password: ENC(msu6yFfOUrDYhxA117PjOIPp6K5wwUR4)
jpa:
hibernate:
ddl-auto: create
ddl-auto: update
naming:
implicit-strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ data class UserInfo(
) {

val baseList: List<String>
get() = base.split(".")
get() = base.split(",")
val keywordList: List<String>
get() = keyword.split(".")
get() = keyword.split(",")

companion object {

Expand Down

0 comments on commit 4bb9af5

Please sign in to comment.