Skip to content

Commit

Permalink
refactor: Qualifer 오타를 -> Value로 수정한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Jan 28, 2025
1 parent 03f9033 commit b838a91
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.misik.api.infra

import me.misik.api.core.Chatbot
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpHeaders
Expand All @@ -12,16 +12,16 @@ import org.springframework.web.service.invoker.HttpServiceProxyFactory

@Configuration
class ClovaChatbotConfiguration(
@Qualifier("\${me.misik.chatbot.clova.url:https://clovastudio.stream.ntruss.com/}") private val chatbotUrl: String,
@Qualifier("\${me.misik.chatbot.clova.authorization}") private val authorization: String,
@Value("\${me.misik.chatbot.clova.url:https://clovastudio.stream.ntruss.com/}") private val chatbotUrl: String,
@Value("\${me.misik.chatbot.clova.authorization:nv-e44d6c703b0049adb0db06ac1bcb85362x02}") private val authorization: String,
) {

@Bean
fun clovaChatbot(): Chatbot {
val webClient = WebClient.builder()
.baseUrl(chatbotUrl)
.defaultHeaders { headers ->
headers.add(HttpHeaders.AUTHORIZATION, authorization)
headers.add(HttpHeaders.AUTHORIZATION, "Bearer $authorization")
headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
headers.add(HttpHeaders.ACCEPT, MediaType.TEXT_EVENT_STREAM_VALUE)
}
Expand Down

0 comments on commit b838a91

Please sign in to comment.