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

Vedran Pavic commented on CXF-6869:
-----------------------------------

No problem Sergey, I'll give my best to explain the current state, and what I'm 
trying to achieve :)

With the current state of auto-configuration, everything is dependent on the 
presence of {{SpringBus}} bean in the application context 
({{@ConditionalOnMissingBean(SpringBus.class)}} in {{CxfAutoConfiguration}}). 
This means if one either declares that bean manually, or imports 
{{META-INF/cxf/cxf.xml}} nothing is auto-configured.

This is what you've been observing with your JAX-RS demo app. To verify this, 
try starting your Spring Boot apps with {{--debug}} switch (see 
http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-troubleshoot-auto-configuration
 for more info on that). Then search for {{CxfAutoConfiguration}} in the log 
output.

I'd like to improve things not to have such strict criteria for disabling 
auto-configuration altogether. For example, if one declares {{SpringBus}} bean 
manually, the auto-configuration for {{CXFServlet}} should still work. I'd also 
like to make use of {{SpringComponentScanServer}} in auto-configuration, since 
most Spring Boot users would certainly be interested in benefits it offers, but 
at the same same have the possibility to easily disable it without dropping 
other parts of auto-configuration (servlet, bus). Having said that, removing of 
{{JaxRsConfig}} import from {{AbstractSpringConfigurationFactory}} is highly 
beneficial since it would allow a clean separation of configuration concerns - 
servlet/bus/frontend-specific-config.

Hope this helps :)

> 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