cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vedran Pavic (JIRA)" <>
Subject [jira] [Commented] (CXF-6869) Consider adding Spring Boot starter
Date Fri, 27 May 2016 21:54:13 GMT


Vedran Pavic commented on CXF-6869:

Hey Sergey,

The thing that's causing the issue with your sample is it's unnecessary complexity - you have
two Spring Boot main classes in your project, {{SampleRestApplication}} and {{SampleScanRestApplication}}.
It does not matter that you explicitly mark one of them as main-class in your {{pom.xml}}
- the other is still in the same package tree and it's a valid {{@Configuration}} class (by
virtue of {{@SpringBootApplication}} being composite annotation which, among other things,
includes {{@Configuration}} annotation) so it's going to get picked up by Spring's application
context component scanning mechanisms.

In practice, this means that when you designate {{SampleRestApplication}} as your Spring Boot
main-class the {{@Import(SpringComponentScanServer.class)}} from {{SampleScanRestApplication}}
will still be in effect.

This kind of usage is actually not considered the best practice in Spring Boot world.

I encourage you to reuse the samples I've prepared as much as possible - they are simple and
provide best practices without additional complexity.

> Consider adding Spring Boot starter
> -----------------------------------
>                 Key: CXF-6869
>                 URL:
>             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:
> 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
> 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

View raw message