CXF and Spring integration problems: No bean named ' CXF ' is defined

Source: Internet
Author: User

Today in the WS and spring integration, unfortunately encountered this problem, Baidu for a long time, unexpectedly no one encountered this problem, and then Google a bit, are encountering this problem ... In See an article mentioned cxf.xml, so I decisively open this configuration file to look at, there is a very important place:

<bean id="cxf"class="Org.apache.cxf.bus.spring.SpringBus   "destroy-method="shutdown"/>

Oh, so this bean is defined here, it should be that this file has not been imported into our spring file. After a closer look, I found that my WS's Spring configuration file was not scanned ==!.

It seems that the high version of spring will automatically load these files. If it is not loaded, then we will load it manually:

      <!--some core configurations of CXF-   <import resource="classpath:meta-inf/cxf/cxf.xml" / >    <import resource="classpath:meta-inf/cxf/cxf-extension-soap.xml" />   <import resource="classpath:meta-inf/cxf/cxf-servlet.xml"

One of the problems we encountered was in ' Cxf.xml '.

CXF and Spring integration problems: No bean named ' CXF ' is defined

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.