axis2和springboot冲突问题

错误:NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/

原因:axis2-kernel的jar包中包含了servlet-api.2.3的版本,而getVirtualServerName()这个方法是3.1之后的版本,所以报错

解决方案:将axis2-kernel的jar删除掉

<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.6.3</version>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
<!--<type>jar</type>-->
<!--<scope>compile</scope>-->
</dependency>
posted @ 2020-05-27 21:48  忆殇314  阅读(1066)  评论(0编辑  收藏  举报