cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [04/36] cxf git commit: Updating JAX-RS Spring config factory to check cxf.jaxrs.server.address
Date Thu, 25 Aug 2016 01:47:51 GMT
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/7e4873de
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7e4873de
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7e4873de

Branch: refs/heads/master-jaxrs-2.1
Commit: 7e4873de12e96639c11a708062e1660e2c89a890
Parents: 67989f8
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:49:57 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/7e4873de/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