今天用springboot写了个webservice的接口
启动项目后报错class not found EmbeddedServletContainerAutoConfiguration
然后看了下pom.xml文件中的依赖如下:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.5.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
<!-- CXF webservice -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>3.1.16</version>
</dependency>
<!-- CXF webservice -->
然后将org.apache.cxf的依赖版本改到3.2.6,重新编译就好了
<!-- CXF webservice --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-spring-boot-starter-jaxws</artifactId> <version>3.2.6</version> </dependency> <!-- CXF webservice -->