java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter

项目中出现

java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:509)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:490)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
    at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4700)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5340)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


原因:

      缺少jar,即在工程部署后在WEB-INF下没有生成lib目录,正常情况下,会生成lib目录并把工程的所有依赖jar包都部署到该目录下

解决办法:

             右击项目–>properties–>Deployment Assembly–>点击add添加maven依赖,最后点击Ok即可
java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter_第1张图片

java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter_第2张图片

java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter_第3张图片java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter_第4张图片

你可能感兴趣的:(java.lang.ClassNotFoundException: org.springframework.web.filter.CharacterEncodingFilter)