This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new ad40b40327 Add support for SimpleLanguageFunctionFactory
ad40b40327 is described below
commit ad40b403275020937a9eb394eca219a5d22d9f2f
Author: James Netherton <[email protected]>
AuthorDate: Wed Mar 5 14:15:28 2025 +0000
Add support for SimpleLanguageFunctionFactory
Fixes #7093
---
.../camel/quarkus/core/deployment/CamelProcessor.java | 3 ++-
.../platform/http/it/PlatformHttpRouteBuilder.java | 3 +++
.../quarkus/component/http/server/it/PlatformHttpTest.java | 13 +++++++++++++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git
a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
index a56a587a20..85e2a89f7f 100644
---
a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
+++
b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java
@@ -177,7 +177,8 @@ class CamelProcessor {
"META-INF/services/org/apache/camel/health-check/*",
"META-INF/services/org/apache/camel/periodic-task/*",
"META-INF/services/org/apache/camel/transformer/*",
- "META-INF/services/org/apache/camel/tokenizer/*"));
+ "META-INF/services/org/apache/camel/tokenizer/*",
+
"META-INF/services/org/apache/camel/simple-function-factory/*"));
}
@BuildStep
diff --git
a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
index 79dd68efe1..e542096387 100644
---
a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
+++
b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
@@ -97,6 +97,9 @@ public class PlatformHttpRouteBuilder extends RouteBuilder {
}
});
+
from("platform-http:/platform-http/multipart/simple?httpMethodRestrict=POST")
+ .setBody().simple("${attachmentContentAsText(file)}");
+
from("platform-http:/platform-http/form-urlencoded?httpMethodRestrict=POST")
.to("log:form-urlencoded")
.setBody(e -> ((Map<String, Object>)
e.getMessage().getBody(Map.class)).entrySet().stream()
diff --git
a/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
b/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
index 055bc16d50..a99aef7f6a 100644
---
a/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
+++
b/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
@@ -163,6 +163,19 @@ class PlatformHttpTest {
Assertions.assertArrayEquals(bytes, returnedBytes);
}
+ @Test
+ public void attachmentSimpleExpressions() {
+ final byte[] bytes = new byte[] { 0xc, 0x0, 0xf, 0xe, 0xb, 0xa, 0xb,
0xe };
+ final byte[] returnedBytes =
RestAssured.given().contentType("multipart/form-data")
+ .multiPart("file", "bytes.bin", bytes)
+ .formParam("description", "cofe babe")
+ .post("/platform-http/multipart/simple")
+ .then()
+ .statusCode(200)
+ .extract().body().asByteArray();
+ Assertions.assertArrayEquals(bytes, returnedBytes);
+ }
+
@Test
public void formUrlEncoded() {
RestAssured.given().contentType("application/x-www-form-urlencoded")