cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Updating JAX-RS Spring config factory to check cxf.jaxrs.server.address
Date Tue, 16 Aug 2016 15:51:04 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 2b24f8986 -> 62b95fbd9


Updating JAX-RS Spring config factory to check cxf.jaxrs.server.address


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/62b95fbd
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/62b95fbd
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/62b95fbd

Branch: refs/heads/3.1.x-fixes
Commit: 62b95fbd9090f659e1c415d8d39a92fcc6bd6f12
Parents: 2b24f89
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Aug 16 16:49:57 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Aug 16 16:50:47 2016 +0100

----------------------------------------------------------------------
 .../jaxrs/spring/AbstractSpringConfigurationFactory.java  | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/62b95fbd/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/AbstractSpringConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/AbstractSpringConfigurationFactory.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/AbstractSpringConfigurationFactory.java
index c1e5d60..a9c6cf5 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/AbstractSpringConfigurationFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/AbstractSpringConfigurationFactory.java
@@ -22,11 +22,13 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.cxf.bus.spring.SpringBus;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.feature.Feature;
 import org.apache.cxf.interceptor.AbstractBasicInterceptorProvider;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 
@@ -34,6 +36,8 @@ public abstract class AbstractSpringConfigurationFactory
     extends AbstractBasicInterceptorProvider implements ApplicationContextAware {
 
     protected ApplicationContext applicationContext;
+    @Value("${cxf.jaxrs.server.address:}")
+    private String jaxrsServerAddress;
     
     protected Server createJaxRsServer() {
 
@@ -68,7 +72,11 @@ public abstract class AbstractSpringConfigurationFactory
     }
     
     protected String getAddress() {
-        return "/";
+        if (!StringUtils.isEmpty(jaxrsServerAddress)) {
+            return jaxrsServerAddress;
+        } else {
+            return "/";
+        }
     }
     
     protected String getTransportId() {


Mime
View raw message