Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DA5CB2007D1 for ; Thu, 12 May 2016 18:38:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D9064160939; Thu, 12 May 2016 16:38:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 08CA71602BF for ; Thu, 12 May 2016 18:38:36 +0200 (CEST) Received: (qmail 52854 invoked by uid 500); 12 May 2016 16:38:36 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 52845 invoked by uid 99); 12 May 2016 16:38:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 May 2016 16:38:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 20339DFCC0; Thu, 12 May 2016 16:38:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: <14a14cb88c5b44ac9fc14b03f16755da@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Thu, 12 May 2016 16:38:38 -0000 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 Authored: Thu May 12 17:38:21 2016 +0100 Committer: Sergey Beryozkin 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 @@ + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + org.apache.cxf cxf-spring-boot-autoconfigure ${project.version} @@ -47,11 +55,6 @@ ${project.version} - ${cxf.servlet-api.group} - ${cxf.servlet-api.artifact} - ${cxf.servlet-api.version} - - javax.validation validation-api 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 @@ + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + org.apache.cxf cxf-spring-boot-autoconfigure ${project.version} @@ -47,11 +55,6 @@ ${project.version} - ${cxf.servlet-api.group} - ${cxf.servlet-api.artifact} - ${cxf.servlet-api.version} - - javax.validation validation-api 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 @@ ${cxf.spring.boot.version} + org.springframework.boot + spring-boot-starter + ${cxf.spring.boot.version} + + + org.springframework.boot + spring-boot-starter-web + ${cxf.spring.boot.version} + + org.springframework.security spring-security-web ${cxf.spring.security.version}