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

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

Hey Sergey,

Regarding the existing sample complexity - I understand what was your 
intention, but the bottom line is the implementation introduced hidden 
complexity that can be confusing, especially for users not so familiar with 
Spring. You know the old saying - the road to hell is paved with good 
intentions :)
I'd like to stress that Spring Boot didn't get confused here, it just did what 
it's supposed to do. The key here is to understand the composition of 
{{@SpringBootApplication}} annotation and the fact that declaring main-class in 
your build only affects application packaging, i.e. what class should the 
executable JAR run. The right way to achieve what you were trying to do here is 
to use Spring {{@Profile}} support.

Concerning WADL, all I did is add the {{cxf-rt-rs-service-description}} 
artifact to the JAX-RS starter.
My motivation to add it was the service listing servlet - it generates 
{{?_wadl}} links by default which don't work without 
{{cxf-rt-rs-service-description}} artifact, which is not the greatest user 
experience IMO. From what I can tell, the Swagger support is also located in 
this module so I don't see any harm including in the starter. It's a single 
dependency that's very useful in JAX-RS scenario.

When debugging the Spring Boot apps, maybe you've missed my previous comment on 
this, try starting your app 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. This will tell you which auto-configuration conditions were met and 
which were not, as well as why.

I know you're trying to understand things as much as possible and it's 
perfectly fine, I'm here to help as much as I can :)

> 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