一,创建springboot项目
二,导入依赖
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.1.12</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.1.12</version>
</dependency>
<!--有两种发布方式,第一种直接在springboot启动类中使用Endpoint发布服务,
需要导入下面的jetty依赖,否则会报错:
Cannot find any registered HttpDestinationFactory from the Bus.
-->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>3.1.6</version>