[ 
https://issues.apache.org/jira/browse/CXF-6869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277046#comment-15277046
 ] 

Vedran Pavic edited comment on CXF-6869 at 5/9/16 9:10 PM:
-----------------------------------------------------------

Hey Sergey, you suprised me by merging this so quickly :)

To answer you question first - by default Spring Boot loads configuration 
properties from {{application.properties}} file. Or {{application.yml}}, if you 
prefer YAML for your configuration. So you need to place {{cxf.path}} property 
in that file to customize the servlet mapping.

Having said that, I noticed that {{CxfAutoConfigurationTests}} did not execute 
during project build. If it did, it would've failed since I forgot to adjust 
the tests to use {{cxf.}} configuration properties prefix, instead of 
{{spring.cxf.}}. This is a remnant for my original PR which was opened against 
Spring Boot project.

Another remnant that causes failure is dependency injection in 
{{CxfAutoConfiguration}} - I've used construction injection in 
{{@Configuration}} class which is not supported until Spring 4.3. The original 
PR was targeted at Spring Boot 1.4 (which uses Spring 4.3) - in CXF we have to 
refer to a stable Spring Boot version, which mean we'll be using Spring 4.2.x.

The third omission was in dependency management department - starters did not 
include {{spring-boot-starter-web}} as a dependency.

I've opened a PR to address these 3 issues:
https://github.com/apache/cxf/pull/134

Finally, I've put together a JAX-WS sample application to help you with your 
tests:
https://github.com/vpavic-samples/spring-boot-cxf-jax-ws

Please let me know what's up with the execution of 
{{CxfAutoConfigurationTests}}.

Thanks.


was (Author: vpavic):
Hey Sergey, you suprised me by merging this so quickly :)

To answer you question first - by default Spring Boot loads configuration 
properties from {{application.properties}} file. Or {{application.yml}}, if you 
prefer YAML for your configuration. So you need to place {{cxf.path}} property 
in that file to customize the servlet mapping.

Having said that, I noticed that {{CxfAutoConfigurationTests}} did not execute 
during project build. If it did, it would've failed since I forgot to adjust 
the tests to use {{cxf.*}} configuration properties prefix, instead of 
{{spring.cxf.*}}. This is a remnant for my original PR which was opened against 
Spring Boot project.

Another remnant that causes failure is dependency injection in 
{{CxfAutoConfiguration}} - I've used construction injection in 
{{@Configuration}} class which is not supported until Spring 4.3. The original 
PR was targeted at Spring Boot 1.4 (which uses Spring 4.3) - in CXF we have to 
refer to a stable Spring Boot version, which mean we'll be using Spring 4.2.x.

The third omission was in dependency management department - starters did not 
include {{spring-boot-starter-web}} as a dependency.

I've opened a PR to address these 3 issues:
https://github.com/apache/cxf/pull/134

Finally, I've put together a JAX-WS sample application to help you with your 
tests:
https://github.com/vpavic-samples/spring-boot-cxf-jax-ws

Please let me know what's up with the execution of 
{{CxfAutoConfigurationTests}}.

Thanks.

> Consider adding Spring Boot starter
> -----------------------------------
>
>                 Key: CXF-6869
>                 URL: https://issues.apache.org/jira/browse/CXF-6869
>             Project: CXF
>          Issue Type: New Feature
>          Components: Integration
>            Reporter: Vedran Pavic
>
> I've recently authored a PR in Spring Boot to add support for 
> auto-configuration of {{CXFServlet}} and default CXF's configuration:
> https://github.com/spring-projects/spring-boot/pull/5659
> The PR was closed with "won't fix" resolution since Boot team are unwilling 
> to add CXF as a dependency to the project. Instead a 3rd party starter was 
> suggested.
> The concept of a 3rd party starter is generally encouraged for technologies 
> that don't have first-class support in projects from Spring portfolio. Such 
> 3rd party starters are listed here:
> https://github.com/spring-projects/spring-boot/blob/master/spring-boot-starters/README.adoc
> If CXF team is interested, I'm willing to port my PR to CXF.
> Note that the original PR was focused around JAX-WS support, but can be 
> easily expanded to include JAX-RS support as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to