You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/07/20 09:23:06 UTC
(camel) 01/01: CAMEL-24183: Fix Spring rsClient producer to apply endpoint URI options
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch fix/CAMEL-24183
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 453f29d8a24cbca744a42fa17fd52edb881a456a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Jul 20 11:22:49 2026 +0200
CAMEL-24183: Fix Spring rsClient producer to apply endpoint URI options
Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
Signed-off-by: Claus Ibsen <cl...@gmail.com>
---
.../component/cxf/spring/jaxrs/CxfRsSpringEndpoint.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/components/camel-cxf/camel-cxf-spring-rest/src/main/java/org/apache/camel/component/cxf/spring/jaxrs/CxfRsSpringEndpoint.java b/components/camel-cxf/camel-cxf-spring-rest/src/main/java/org/apache/camel/component/cxf/spring/jaxrs/CxfRsSpringEndpoint.java
index 27c90f4ccfab..993cb1790a7a 100644
--- a/components/camel-cxf/camel-cxf-spring-rest/src/main/java/org/apache/camel/component/cxf/spring/jaxrs/CxfRsSpringEndpoint.java
+++ b/components/camel-cxf/camel-cxf-spring-rest/src/main/java/org/apache/camel/component/cxf/spring/jaxrs/CxfRsSpringEndpoint.java
@@ -66,11 +66,21 @@ public class CxfRsSpringEndpoint extends CxfRsEndpoint implements BeanIdAware {
@Override
protected void setupJAXRSClientFactoryBean(JAXRSClientFactoryBean cfb, String address) {
+ // apply Spring bean config first so URI options can override
configurer.configureBean(beanId, cfb);
- // support to call the configurer here
- getNullSafeCxfRsEndpointConfigurer().configure(cfb);
- cfb.setAddress(address);
+ if (getModelRef() != null) {
+ cfb.setModelRef(getModelRef());
+ }
+ if (getResourceClasses() != null && !getResourceClasses().isEmpty()) {
+ cfb.setResourceClass(getResourceClasses().get(0));
+ cfb.getServiceFactory().setResourceClasses(getResourceClasses());
+ }
+ setupCommonFactoryProperties(cfb);
cfb.setThreadSafe(true);
+ getNullSafeCxfRsEndpointConfigurer().configure(cfb);
+ if (address != null) {
+ cfb.setAddress(address);
+ }
}
@Override