最近在搞一个ssm+shiro的整合 用的maven tomcat插件 启动的时候报错,提示   

网上查找资料后说是jar包冲突,写了一个测试类

 

import java.net.URL;

import javax.servlet.Filter;

public class zzzz {
public static void main(String[] args) {
URL url = Filter.class.getProtectionDomain().getCodeSource().getLocation(); 
System.out.println("path:"+url.getPath()+" name:"+url.getFile()); 

}
}

 

 

 

发现时javax-servlet-api jar冲突

查看maven 依赖如下图

排除maven jar冲突  maven tomcat插件启动报错 filter转换异常

        发现 freemaker的标签jar引用啦servlet 于是将其排除,问题解决。

<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>shiro-freemarker-tags</artifactId>
<version>0.1</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>

 

 

ps:问题发生不要一味百度,仔细看可能答案就在你眼前

 

 

相关文章:

  • 2022-12-23
  • 2021-05-11
  • 2021-04-21
  • 2021-06-18
  • 2022-01-18
  • 2021-09-26
  • 2021-06-27
  • 2021-07-25
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-06-08
相关资源
相似解决方案