cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vedran Pavic (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6869) Consider adding Spring Boot starter
Date Wed, 08 Jun 2016 11:57:21 GMT

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

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

Aha, I misunderstood your problem. Yes, that of course works.
My samples are tested against the code I submitted in the last PR.

Refer to Javadoc of following classes for more details:
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnClass.java
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java

Note that inner class annotated with {{@ConditionalOnClass(JAXRSServerFactoryBean.class)}}
is actually a {{@Configuration}} class also, meaning it won't get loaded if all its conditions
aren't met. Referencing classes in auto-configuration does not mean those classes need to
be present on the classpath, that's the power of Spring Boot and the rationale behind having
optional dependencies for auto-configuration module.

I've tried to stress this earlier by linking to contents of Boot's own auto-configuration
module but apparently I failed at that :)
https://github.com/spring-projects/spring-boot/tree/master/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure

> 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)

Mime
View raw message