Stomp 정리
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
// 클라이언트가 "/ws-stomp" 경로로 WebSocket 연결을 시작하도록 설정
registry.addEndpoint("/ws-stomp")
// WebSocket을 지원하지 않는 브라우저를 위해 SockJS 폴백 옵션 활성화
.withSockJS();
}@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
// 1. 서버 -> 클라이언트 메시지 전송 (구독)
// "/sub"으로 시작하는 경로를 구독하는 클라이언트에게 메시지를 브로드캐스팅
registry.enableSimpleBroker("/sub");
// 2. 클라이언트 -> 서버 메시지 전송 (발행)
// "/pub"으로 시작하는 경로로 들어온 메시지는 @MessageMapping이 붙은 메서드로 라우팅
registry.setApplicationDestinationPrefixes("/pub");
}## HTTP의 @PathVariable vs STOMP의 @DestinationVariable
@PathVariable vs STOMP의 @DestinationVariableLast updated

