|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2023 the original author or authors. |
|
|
|
* Copyright 2002-2024 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. |
|
|
|
@ -38,6 +38,7 @@ import org.springframework.lang.Nullable; |
|
|
|
import org.springframework.messaging.rsocket.RSocketRequester; |
|
|
|
import org.springframework.messaging.rsocket.RSocketRequester; |
|
|
|
import org.springframework.messaging.rsocket.RSocketStrategies; |
|
|
|
import org.springframework.messaging.rsocket.RSocketStrategies; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
|
|
|
import org.springframework.util.ClassUtils; |
|
|
|
import org.springframework.util.MimeType; |
|
|
|
import org.springframework.util.MimeType; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.util.StringValueResolver; |
|
|
|
import org.springframework.util.StringValueResolver; |
|
|
|
@ -134,9 +135,7 @@ final class RSocketServiceMethod { |
|
|
|
Class<?> actualType = actualParam.getNestedParameterType(); |
|
|
|
Class<?> actualType = actualParam.getNestedParameterType(); |
|
|
|
|
|
|
|
|
|
|
|
Function<RSocketRequestValues, Publisher<?>> responseFunction; |
|
|
|
Function<RSocketRequestValues, Publisher<?>> responseFunction; |
|
|
|
if (actualType.equals(void.class) || actualType.equals(Void.class) || |
|
|
|
if (ClassUtils.isVoidType(actualType) || (reactiveAdapter != null && reactiveAdapter.isNoValue())) { |
|
|
|
(reactiveAdapter != null && reactiveAdapter.isNoValue())) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
responseFunction = values -> { |
|
|
|
responseFunction = values -> { |
|
|
|
RSocketRequester.RetrieveSpec retrieveSpec = initRequest(requester, values); |
|
|
|
RSocketRequester.RetrieveSpec retrieveSpec = initRequest(requester, values); |
|
|
|
return (values.getPayload() == null && values.getPayloadValue() == null ? |
|
|
|
return (values.getPayload() == null && values.getPayloadValue() == null ? |
|
|
|
|