@ -1,5 +1,5 @@
/ *
/ *
* Copyright 2002 - 2018 the original author or authors .
* Copyright 2002 - 202 1 the original author or authors .
*
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
* you may not use this file except in compliance with the License .
@ -28,6 +28,7 @@ import org.springframework.lang.Nullable;
import org.springframework.messaging.Message ;
import org.springframework.messaging.Message ;
import org.springframework.messaging.MessageChannel ;
import org.springframework.messaging.MessageChannel ;
import org.springframework.messaging.MessageHeaders ;
import org.springframework.messaging.MessageHeaders ;
import org.springframework.messaging.core.AbstractMessageSendingTemplate ;
import org.springframework.messaging.handler.DestinationPatternsMessageCondition ;
import org.springframework.messaging.handler.DestinationPatternsMessageCondition ;
import org.springframework.messaging.handler.annotation.SendTo ;
import org.springframework.messaging.handler.annotation.SendTo ;
import org.springframework.messaging.handler.annotation.support.DestinationVariableMethodArgumentResolver ;
import org.springframework.messaging.handler.annotation.support.DestinationVariableMethodArgumentResolver ;
@ -35,7 +36,6 @@ import org.springframework.messaging.handler.invocation.HandlerMethodReturnValue
import org.springframework.messaging.simp.SimpMessageHeaderAccessor ;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor ;
import org.springframework.messaging.simp.SimpMessageSendingOperations ;
import org.springframework.messaging.simp.SimpMessageSendingOperations ;
import org.springframework.messaging.simp.SimpMessageType ;
import org.springframework.messaging.simp.SimpMessageType ;
import org.springframework.messaging.simp.SimpMessagingTemplate ;
import org.springframework.messaging.simp.annotation.SendToUser ;
import org.springframework.messaging.simp.annotation.SendToUser ;
import org.springframework.messaging.simp.user.DestinationUserNameProvider ;
import org.springframework.messaging.simp.user.DestinationUserNameProvider ;
import org.springframework.messaging.support.MessageHeaderInitializer ;
import org.springframework.messaging.support.MessageHeaderInitializer ;
@ -68,7 +68,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
private String defaultUserDestinationPrefix = "/queue" ;
private String defaultUserDestinationPrefix = "/queue" ;
private PropertyPlaceholderHelper placeholderHelper = new PropertyPlaceholderHelper ( "{" , "}" , null , false ) ;
private final PropertyPlaceholderHelper placeholderHelper = new PropertyPlaceholderHelper ( "{" , "}" , null , false ) ;
@Nullable
@Nullable
private MessageHeaderInitializer headerInitializer ;
private MessageHeaderInitializer headerInitializer ;
@ -244,7 +244,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
if ( sessionId ! = null ) {
if ( sessionId ! = null ) {
headerAccessor . setSessionId ( sessionId ) ;
headerAccessor . setSessionId ( sessionId ) ;
}
}
headerAccessor . setHeader ( SimpMessag ingTemplate. CONVERSION_HINT_HEADER , returnType ) ;
headerAccessor . setHeader ( AbstractMessageSend ingTemplate. CONVERSION_HINT_HEADER , returnType ) ;
headerAccessor . setLeaveMutable ( true ) ;
headerAccessor . setLeaveMutable ( true ) ;
return headerAccessor . getMessageHeaders ( ) ;
return headerAccessor . getMessageHeaders ( ) ;
}
}