diff --git a/build.gradle b/build.gradle
index 57c1e4a784..66a1b4e493 100644
--- a/build.gradle
+++ b/build.gradle
@@ -317,7 +317,6 @@ project('spring-integration-core') {
testCompile ("org.aspectj:aspectjweaver:$aspectjVersion")
testCompile ("net.openhft:chronicle:$chronicleVersion")
- testCompile ("io.projectreactor.spring:reactor-spring-context:$reactorVersion")
}
}
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/annotation/MessagingGateway.java b/spring-integration-core/src/main/java/org/springframework/integration/annotation/MessagingGateway.java
index 207b1f88ce..489c66cfb8 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/annotation/MessagingGateway.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/annotation/MessagingGateway.java
@@ -135,7 +135,9 @@ public @interface MessagingGateway {
*
This attribute is required in case of {@link reactor.rx.Promise} usage.
* @return the suggested reactor Environment bean name.
* @since 4.1
+ * @deprecated with no-op in favor of global JVM-wide Reactor configuration.
*/
+ @Deprecated
String reactorEnvironment() default "";
}
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java b/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java
index 9d3fffdaae..dd39596c25 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/config/MessagingGatewayRegistrar.java
@@ -99,7 +99,6 @@ public class MessagingGatewayRegistrar implements ImportBeanDefinitionRegistrar,
String defaultReplyChannel = (String) gatewayAttributes.get("defaultReplyChannel");
String errorChannel = (String) gatewayAttributes.get("errorChannel");
String asyncExecutor = (String) gatewayAttributes.get("asyncExecutor");
- String reactorEnvironment = (String) gatewayAttributes.get("reactorEnvironment");
String mapper = (String) gatewayAttributes.get("mapper");
boolean hasMapper = StringUtils.hasText(mapper);
@@ -125,7 +124,7 @@ public class MessagingGatewayRegistrar implements ImportBeanDefinitionRegistrar,
String headerExpression = (String) header.get("expression");
boolean hasValue = StringUtils.hasText(headerValue);
- if (!(hasValue ^ StringUtils.hasText(headerExpression))) {
+ if (hasValue == StringUtils.hasText(headerExpression)) {
throw new BeanDefinitionStoreException("exactly one of 'value' or 'expression' " +
"is required on a gateway's header.");
}
@@ -157,9 +156,6 @@ public class MessagingGatewayRegistrar implements ImportBeanDefinitionRegistrar,
else if (StringUtils.hasText(asyncExecutor)) {
gatewayProxyBuilder.addPropertyReference("asyncExecutor", asyncExecutor);
}
- if (StringUtils.hasText(reactorEnvironment)) {
- gatewayProxyBuilder.addPropertyReference("reactorEnvironment", reactorEnvironment);
- }
if (StringUtils.hasText(mapper)) {
gatewayProxyBuilder.addPropertyReference("mapper", mapper);
}
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/xml/GatewayParser.java b/spring-integration-core/src/main/java/org/springframework/integration/config/xml/GatewayParser.java
index 1b4337c457..bbe754681f 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/config/xml/GatewayParser.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/config/xml/GatewayParser.java
@@ -73,7 +73,6 @@ public class GatewayParser implements BeanDefinitionParser {
}
gatewayAttributes.put("mapper", element.getAttribute("mapper"));
- gatewayAttributes.put("reactorEnvironment", element.getAttribute("reactor-environment"));
gatewayAttributes.put("defaultReplyTimeout",
element.getAttribute(isNested ? "reply-timeout" : "default-reply-timeout"));
gatewayAttributes.put("defaultRequestTimeout",
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java
index 7e59b39aef..c5641c2eb4 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java
@@ -118,8 +118,6 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint
private volatile Class> asyncSubmitListenableType;
- private volatile Object reactorEnvironment;
-
private volatile boolean initialized;
private final Object initializationMonitor = new Object();
@@ -256,12 +254,11 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint
* service interface).
* @param reactorEnvironment the Reactor Environment.
* @since 4.1
+ * @deprecated with no-op in favor of global JVM-wide Reactor configuration.
*/
+ @Deprecated
public void setReactorEnvironment(Object reactorEnvironment) {
- if (!Environment.class.getName().equals(reactorEnvironment.getClass().getName())) {
- throw new IllegalArgumentException("The 'reactorEnvironment' must be instance of 'reactor.Environment'");
- }
- this.reactorEnvironment = reactorEnvironment;
+
}
@Override
@@ -364,10 +361,7 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint
}
}
if (reactorPresent && Promise.class.isAssignableFrom(returnType)) {
- if (this.reactorEnvironment == null) {
- throw new IllegalStateException("'reactorEnvironment' is required in case of 'Promise' return type.");
- }
- return Promises.