前言
这一篇来说CXF的基本使用方法 快速写出一个WebService服务应用
使用maven构建项目
开发
第一步
导入依赖到 pom.xml 中
- cxf-core 核心包
- cxf-rt-transports-http-jetty 用的是jetty这个容器 所以不需要用tomcat了
- cxf-rt-frontend-jaxws jaxws的支持
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-frontend-jaxws -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.3.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-core -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>3.3.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-transports-http-jetty -->