Maven项目启动报错:org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter
看网上说法tomcat启动时会把lib目录下的jar包加载进内存,而项目里也有相同的jar包就会导致jar包冲突
解决办法;
把pom依赖里相应的jar包添加<scope>标签
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>3.0-alpha-1</version>
<scope>provided</scope>
</dependency>
scope标签值选择provided表示项目部署时不会把这个jar包包含进去
Maven项目启动报错:org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter的更多相关文章
- java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter
java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast ...
- eclipse 中导入 maven项目 启动报错
导入Maven项目到Eclipse中时,出现问题如下: java.lang.ClassNotFoundException: org.springframework.web.context.Contex ...
- Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架
SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...
- maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.
SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...
- maven项目启动报错;class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not exist
项目启动报了一堆错误,其实都是class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not ...
- Maven项目启动报错
错误信息如下: 六月 , :: 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{S ...
- 启动Maven项目启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,你需要设置一下eclipse:项目 -> 属性 -> Deployment Assembly -> Add - ...
- maven项目 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,所以找不到解决方法:设置一下eclipse:项目 -> properties -> Deployment Assem ...
- Maven项目启动报错:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
1.场景 1.1.先确认pom.xml文件已添加mysql依赖: <dependency> <groupId>mysql</groupId> < ...
随机推荐
- 小程序 input 键盘弹出时样式遮盖问题
设置cursor-spacing,具体可参考官方文档,代码如下: <input type='text' bindinput="bindKeyInput" placehold ...
- abap form格式的异常处理
1: form 中有异常时,需要用 raising 将异常抛出. *&------------------------------------------------------------- ...
- Object.keys(),Object.values() 用法
ES8新特性 Object.keys() 用法 返回键名组成的数组, let arr={ name:'js', sex:'body' } let keys=Object.keys(arr); cons ...
- [sh]md5sum接变量,find排除,sh判断文件存在
1.md5sum md5sum `cat path_to_file|dos2unix` 注: 发现有些linux是gbk编码, 导致md5或ls 接变量后报错.需要dos2unix处理 2.find排 ...
- Django基础之MTV模型
一.Django基础 一.Django简介 Django是一个开放源代码的Web应用框架,由Python写成.采用了MVC的软件设计模式,即模型(Model).视图(View)和控制器(Control ...
- MySQL更新
1.两表更新(用一个表更新另一个表) UPDATE t_i_borrower a, t_supplier s SET a.type = s.type WHERE a.cust_id = s.cust_ ...
- 【LeetCode每天一题】Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. You may not modify the value ...
- npm下载指定版本的插件
eg:下载boostrap版本为3.3.7 npm install --save-dev bootstrap@3.3.7 备注:--save则将依赖的组件添加到package.json文件下 --sa ...
- [LeetCode] questions conclusion_ Binary Search
Binary Search T(n) = T(n/2) + O(1) => T(n) = O(lg n) proof: 如果能用iterable , 就用while loop, 可以防 ...
- 根据白名单过滤 HTML(防止 XSS 攻击)
https://github.com/leizongmin/js-xss/blob/master/README.zh.md 根据白名单过滤 HTML(防止 XSS 攻击) xss是一个用于对用户输入的 ...