You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2014/09/15 19:11:34 UTC
[jira] [Resolved] (CXF-6003) jaxrs:server "basePackages" attribute
doesn't initialize REST services properly
[ https://issues.apache.org/jira/browse/CXF-6003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-6003.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.1.0
3.0.2
Assignee: Sergey Beryozkin
I applied the proposed change, thanks
> jaxrs:server "basePackages" attribute doesn't initialize REST services properly
> -------------------------------------------------------------------------------
>
> Key: CXF-6003
> URL: https://issues.apache.org/jira/browse/CXF-6003
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.0.0
> Reporter: Hesam Talebi
> Assignee: Sergey Beryozkin
> Fix For: 3.0.2, 3.1.0
>
>
> As I see, there is a feature to let cxf detect REST services automatically through "basePackages" attribute of "jaxrs:server" tag.
> it supposed to scan classpath and create beans for classes with @Path(and @Provider) annotation. the problem is Spring Autowiring doesn't work for these beans, so there is no way to initialize REST services properly.
> I saw the code and think found the problem. in JAXRSServerFactoryBeanDefinitionParser if you change
> {code:xml}
> providers.add(context.getAutowireCapableBeanFactory().createBean(clazz));
> {code}
> to:
> {code:xml}
> providers.add(context.getAutowireCapableBeanFactory().createBean(clazz, 2, true));
> {code}
> everything works fine. it simply tells spring to enable autowiring in bean creation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)