File tree Expand file tree Collapse file tree 3 files changed +34
-3
lines changed
kotlin/com/back/koreaTravelGuide/domain/userChat/stomp
test/kotlin/com/back/koreaTravelGuide/domain/ai/tour/service Expand file tree Collapse file tree 3 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1+ package com.back.koreaTravelGuide.domain.userChat.stomp
2+
3+ import org.springframework.context.annotation.Configuration
4+ import org.springframework.context.annotation.Profile
5+ import org.springframework.messaging.simp.config.ChannelRegistration
6+ import org.springframework.messaging.simp.config.MessageBrokerRegistry
7+ import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker
8+ import org.springframework.web.socket.config.annotation.StompEndpointRegistry
9+ import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
10+
11+ @Profile(" !prod" )
12+ @Configuration
13+ @EnableWebSocketMessageBroker
14+ class UserChatSimpleWebSocketConfig (
15+ private val userChatStompAuthChannelInterceptor : UserChatStompAuthChannelInterceptor ,
16+ ) : WebSocketMessageBrokerConfigurer {
17+ override fun registerStompEndpoints (registry : StompEndpointRegistry ) {
18+ registry.addEndpoint(" /ws/userchat" )
19+ .setAllowedOriginPatterns(" *" )
20+ .withSockJS()
21+ }
22+
23+ override fun configureMessageBroker (registry : MessageBrokerRegistry ) {
24+ registry.setApplicationDestinationPrefixes(" /pub" )
25+ registry.enableSimpleBroker(" /topic" )
26+ }
27+
28+ override fun configureClientInboundChannel (registration : ChannelRegistration ) {
29+ registration.interceptors(userChatStompAuthChannelInterceptor)
30+ }
31+ }
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ springdoc:
143143# Weather API 설정
144144weather :
145145 api :
146- key : ${WEATHER__API__KEY }
146+ key : ${WEATHER_API_KEY }
147147 base-url : https://apihub.kma.go.kr/api/typ02/openApi/MidFcstInfoService
148148
149149# Tour API 설정
Original file line number Diff line number Diff line change 11package com.back.koreaTravelGuide.domain.ai.tour.service
22
3- import kotlin.test.assertEquals
4- import kotlin.test.assertNull
53import org.junit.jupiter.api.DisplayName
64import org.junit.jupiter.api.Test
5+ import kotlin.test.assertEquals
6+ import kotlin.test.assertNull
77
88class TourParamsParserTest {
99 private val parser = TourParamsParser ()
You can’t perform that action at this time.
0 commit comments