cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6869] Updates to the auto configuration code, patch from Vedran Pavic applied, This closes #134
Date Thu, 12 May 2016 16:38:36 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 242fc643d -> a89ca9865


[CXF-6869] Updates to the auto configuration code, patch from Vedran Pavic applied, This closes
#134


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

Branch: refs/heads/master
Commit: a89ca98653b95bcd2ab5cadbe9a419a4cec4893a
Parents: 242fc64
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu May 12 17:38:21 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu May 12 17:38:21 2016 +0100

----------------------------------------------------------------------
 .../boot/autoconfigure/CxfAutoConfiguration.java       |  8 +++-----
 .../boot/autoconfigure/CxfAutoConfigurationTests.java  | 10 +++++-----
 integration/spring-boot/starter-jax-rs/pom.xml         | 13 ++++++++-----
 integration/spring-boot/starter-jax-ws/pom.xml         | 13 ++++++++-----
 parent/pom.xml                                         | 10 ++++++++++
 5 files changed, 34 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a89ca986/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfiguration.java
b/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfiguration.java
index bc1d59c..1ff70a6 100644
--- a/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfiguration.java
+++ b/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfiguration.java
@@ -22,6 +22,7 @@ import java.util.Map;
 
 import org.apache.cxf.bus.spring.SpringBus;
 import org.apache.cxf.transport.servlet.CXFServlet;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -46,11 +47,8 @@ import org.springframework.context.annotation.ImportResource;
 @AutoConfigureAfter(EmbeddedServletContainerAutoConfiguration.class)
 public class CxfAutoConfiguration {
 
-    private final CxfProperties properties;
-
-    public CxfAutoConfiguration(CxfProperties properties) {
-        this.properties = properties;
-    }
+    @Autowired
+    private CxfProperties properties;
 
     @Bean
     public ServletRegistrationBean messageDispatcherServlet() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a89ca986/integration/spring-boot/autoconfigure/src/test/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfigurationTests.java
----------------------------------------------------------------------
diff --git a/integration/spring-boot/autoconfigure/src/test/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfigurationTests.java
b/integration/spring-boot/autoconfigure/src/test/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfigurationTests.java
index 2e9780f..b10091a 100644
--- a/integration/spring-boot/autoconfigure/src/test/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfigurationTests.java
+++ b/integration/spring-boot/autoconfigure/src/test/java/org/apache/cxf/spring/boot/autoconfigure/CxfAutoConfigurationTests.java
@@ -64,19 +64,19 @@ public class CxfAutoConfigurationTests {
     public void customPathMustBeginWithASlash() {
         this.thrown.expect(BeanCreationException.class);
         this.thrown.expectMessage("Path must start with /");
-        load(CxfAutoConfiguration.class, "spring.cxf.path=invalid");
+        load(CxfAutoConfiguration.class, "cxf.path=invalid");
     }
 
     @Test
     public void customPathWithTrailingSlash() {
-        load(CxfAutoConfiguration.class, "spring.cxf.path=/valid/");
+        load(CxfAutoConfiguration.class, "cxf.path=/valid/");
         assertThat(this.context.getBean(ServletRegistrationBean.class).getUrlMappings(),
                 contains("/valid/*"));
     }
 
     @Test
     public void customPath() {
-        load(CxfAutoConfiguration.class, "spring.cxf.path=/valid");
+        load(CxfAutoConfiguration.class, "cxf.path=/valid");
         assertThat(this.context.getBeansOfType(ServletRegistrationBean.class).size(),
                 equalTo(1));
         assertThat(this.context.getBean(ServletRegistrationBean.class).getUrlMappings(),
@@ -85,7 +85,7 @@ public class CxfAutoConfigurationTests {
 
     @Test
     public void customLoadOnStartup() {
-        load(CxfAutoConfiguration.class, "spring.cxf.servlet.load-on-startup=1");
+        load(CxfAutoConfiguration.class, "cxf.servlet.load-on-startup=1");
         ServletRegistrationBean registrationBean = this.context
                 .getBean(ServletRegistrationBean.class);
         assertThat(ReflectionTestUtils.getField(registrationBean, "loadOnStartup"),
@@ -94,7 +94,7 @@ public class CxfAutoConfigurationTests {
 
     @Test
     public void customInitParameters() {
-        load(CxfAutoConfiguration.class, "spring.cxf.servlet.init.key1=value1",
+        load(CxfAutoConfiguration.class, "cxf.servlet.init.key1=value1",
                 "spring.cxf.servlet.init.key2=value2");
         ServletRegistrationBean registrationBean = this.context
                 .getBean(ServletRegistrationBean.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/a89ca986/integration/spring-boot/starter-jax-rs/pom.xml
----------------------------------------------------------------------
diff --git a/integration/spring-boot/starter-jax-rs/pom.xml b/integration/spring-boot/starter-jax-rs/pom.xml
index a08889b..cc8c47a 100644
--- a/integration/spring-boot/starter-jax-rs/pom.xml
+++ b/integration/spring-boot/starter-jax-rs/pom.xml
@@ -32,6 +32,14 @@
     </parent>
     <dependencies>
         <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-spring-boot-autoconfigure</artifactId>
             <version>${project.version}</version>
@@ -47,11 +55,6 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>${cxf.servlet-api.group}</groupId>
-            <artifactId>${cxf.servlet-api.artifact}</artifactId>
-            <version>${cxf.servlet-api.version}</version>
-        </dependency>
-        <dependency>
             <groupId>javax.validation</groupId>
             <artifactId>validation-api</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/cxf/blob/a89ca986/integration/spring-boot/starter-jax-ws/pom.xml
----------------------------------------------------------------------
diff --git a/integration/spring-boot/starter-jax-ws/pom.xml b/integration/spring-boot/starter-jax-ws/pom.xml
index 03aabb0..0afa1ed 100644
--- a/integration/spring-boot/starter-jax-ws/pom.xml
+++ b/integration/spring-boot/starter-jax-ws/pom.xml
@@ -32,6 +32,14 @@
     </parent>
     <dependencies>
         <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-spring-boot-autoconfigure</artifactId>
             <version>${project.version}</version>
@@ -47,11 +55,6 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>${cxf.servlet-api.group}</groupId>
-            <artifactId>${cxf.servlet-api.artifact}</artifactId>
-            <version>${cxf.servlet-api.version}</version>
-        </dependency>
-        <dependency>
             <groupId>javax.validation</groupId>
             <artifactId>validation-api</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/cxf/blob/a89ca986/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index f9f1f03..8b270e4 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1266,6 +1266,16 @@
                 <version>${cxf.spring.boot.version}</version>
             </dependency>
             <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter</artifactId>
+                <version>${cxf.spring.boot.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-web</artifactId>
+                <version>${cxf.spring.boot.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>org.springframework.security</groupId>
                 <artifactId>spring-security-web</artifactId>
                 <version>${cxf.spring.security.version}</version>


Mime
View raw message