You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/config/RoutingFunction.java
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -193,6 +193,12 @@ else if (StringUtils.hasText(functionProperties.getRoutingExpression())) {
193
193
}
194
194
}
195
195
196
+
if (function.getTarget().equals(this)) {
197
+
thrownewIllegalStateException("Failed to establish route, and routing to itself is not allowed as it creates a loop. Please provide: "
198
+
+ "'spring.cloud.function.definition' as Message header or as application property or "
199
+
+ "'spring.cloud.function.routing-expression' as application property.");
0 commit comments