
[Kotlin + SpringBoot] @Transactional 안에서 외부 API 호출 시 발생하는 문제

·
Java & Kotlin/JPA
🧐 들어가기전@Componentclass ChatFacade( private val threadService: ThreadService, private val chatService: ChatService, private val openAiService: OpenAiService,) { @Transactional fun handleChat( userId: Long, question: String, isStreaming: Boolean?, model: String? ): Chat { val thread = threadService.upsertThread(userId) val previousChats ..