Apache CXF框架的单元测试需要内置Jetty容器
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${jetty.version}</version>
<scope>test</scope>
</dependency>
下面是一个基于Spring框架的Apache CXF测试示例
applicationContext-restful.xml
<import resource="classpath:META-INF/cxf/cxf.xml"
来源:oschina
链接:https://my.oschina.net/u/4283640/blog/4261075