您的位置:首页 > 运维架构 > Tomcat

java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringManager.getManager(Ljava/lang/Class;)L

2017-07-17 17:09 645 查看
使用springboot打包web项目的时候运行tomcat7.0报这个错:

java.lang.NoSuchMethodError: org.apache.tomcat.util.res.StringManager.getManager(Ljava/lang/Class;)Lorg/apache/tomcat/util/res/StringManager…

原因:

springboot内嵌tomcat8,与我部署的tomcat7发生了冲突

解决:

排除Springboot中的tomcat相关依赖:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId
<!--添加这一段-->
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</dependency>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  springboot tomcat
相关文章推荐