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

Sergey Beryozkin commented on CXF-6869:
---------------------------------------

Hi Vedran

Re my earlier comment:
"FYI, removing it in the demo did help, the auto configuration is effective if 
no SpringComponentScanServer is imported:
http://git-wip-us.apache.org/repos/asf/cxf/commit/9b1b6cb";, it was not 
complete, I've just realized that that demo application was still loading 
CXFServlet itself, so I removed it:

http://git-wip-us.apache.org/repos/asf/cxf/commit/e95c92a3

and it stopped working, i.e, no AutoConfigure is loaded as far as I can tell. 
In this case neither SpringComponentScanServer nor JaxRsConfig is loaded. 

I've tried to move this code

https://github.com/apache/cxf/blob/master/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java#L39

to a separate Configuration bean as in your demo:

https://github.com/vpavic-samples/spring-boot-cxf-jax-ws/blob/master/src/main/java/sample/ServiceConfig.java
but no luck, CXFServlet is not loaded at all.

Which further confuses me - I said in the previous comment about 
SampleRestApplication2 (which imports SpringComponentScanServer) that it would 
create a CXF Jetty endpoint if no CXFServlet is loaded (just to try and explain 
why would the following be the case: 
https://issues.apache.org/jira/secure/EditComment!default.jspa?id=12959484&commentId=15276567).
 But the demo project has no http-jetty dependency, so CXFServlet is loaded 
somewhere :-)

Cheers, Sergey




> 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
>            Assignee: Sergey Beryozkin
>
> 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