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

ASF GitHub Bot commented on CXF-7908:
-------------------------------------

reta commented on issue #477: CXF-7908 - Allow to customise JAXRS server in 
spring boot when using …
URL: https://github.com/apache/cxf/pull/477#issuecomment-443050444
 
 
   Thanks for the PR, @mswiderski, may be we could apply a bit simple / 
straightforward solution by adding `@ConditionalOnMissingBean` to `jaxRsServer` 
itself? F.e.
   
   ```
   public class SpringComponentScanServer extends 
AbstractSpringComponentScanServer {
       @Bean
       @ConditionalOnMissingBean
       public Server jaxRsServer() {
           return super.createJaxRsServer();
       }
   }
   ```
   
   And same for `SpringJaxrsClassesScanServer`? What do you think? 
   Thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Allow to customise JAXRS server in spring boot when using 
> cxf-spring-boot-autoconfigure
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-7908
>                 URL: https://issues.apache.org/jira/browse/CXF-7908
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 3.2.7
>            Reporter: Maciej Swiderski
>            Priority: Major
>
> when using cxf-spring-boot-autoconfigure (via cxf-spring-boot-starter-jaxrs) 
> there is no way to customise JAXRS server when using component or class scan 
> and with spring boot 2 the bean override is disable by default meaning it 
> will throw an exception if there are multiple beans of the same type).
> Idea is to use 
> {code:java}
> @ConditionalOnMissingBean(name = "jaxRsServerConfiguration"){code}
> on the auto configuration to allow customisation. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to