在项目过程中,使用spring boot整合CXF开发遇到了一些问题,留个记录
网上资料引入cxf-spring-boot-starter-jaxws依赖即可
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>3.1.11</version>
</dependency>
我使用的spring boot 版本为v1.4.1.RELEASE
此时启动项目会报错
错误信息:org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'endpoint' defined in class path resource [com/conf/WebServiceConfig.class]: Bean instantiation via factory method failed;
endpoint.publish("/userService")
然后更换了依赖
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.1.11</vers