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> < ...
随机推荐
- vue-自定义全局键盘码
1.Vue.config.keyCodes.enter=13; //main.js中定义全局 <template> <div> <input v-model=" ...
- swiper默认第二个且居中
var mySwiper = new Swiper ('.swiper-bottom', { spaceBetween: 25, freeMode: true, initialSlide :1,//默 ...
- EOS 帐户权限操作--你找不到的干货 (原创) 续集-EOS 3.0
https://eosfans.io/topics/372 关于2.0权限问题请移步https://eosfans.io/topics/28 目录 查看权限 改变权限 增加权限 删除权限 查看权限 有 ...
- (转)springboot全局处理异常(@ControllerAdvice + @ExceptionHandler)
1.@ControllerAdvice 1.场景一 在构建RestFul的今天,我们一般会限定好返回数据的格式比如: { "code": 0, "data": ...
- 【LeetCode每天一题】Trapping Rain Water(获得雨水的容量)
Given n non-negative integers representing an elevation map where the width of each bar is 1, comput ...
- [LeetCode] 69. Sqrt(x)_Easy tag: Binary Search
Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a no ...
- 家庭记账本之GitHub账号注册与安装(一)
账号注册 1.github是世纪上最大的开源代码托管网站.因为是国外网站,很多人在注册的时候因为不熟悉英语而犯了难. 2.百度搜索github进入官网.如果你已经有账号密码,那么点击右上角的sign ...
- centos 6.x下编译dpdk 16.7 心得
之前对dpdk编译了解得较少,之前直接就把centos yum update了,造成测试经理部署的centos 6.5升级为6.9,造成dpdk编译出错. 先说说centos 6.9下编译的心得: 1 ...
- template.js简单入门
template.js是一款开源的JavaScript模板引擎,用来渲染页面的. github地址 https://github.com/yanhaijing/template.js 下载templa ...
- [13]Windows 内核情景分析 --- 网络通信
典型的基于tcpip协议套接字方式的网络通信模块层次: 应用程序 socket api WS2_32.dll socket irp Afd.sys tdi irp Tcpip.sys 回调函数接口 各 ...