升级log4j2,tomcat

  • 时间:
  • 浏览:3
  • 来源:大发排列3APP下载_大发排列3APP官网

改成3.0  tomcat--7.0.16就会去扫描那些有servlet注解的 class,肯能在很多过程中原应了OOM

肯能,加进 tomcat-7.0.81也没事,

Attribute : metadata-complete

The metadata-complete attribute defines whether this deployment descriptor and other related 

 deployment descriptors for this module (e.g., web service descriptors) are complete, or whether the 

 class files available to this module and packaged with this application should be examined for 

 annotations that specify deployment information. If metadata-complete is set to "true", the 

 deployment tool must ignore any annotations that specify deployment information, which might be 

 present in the class files of the application. If metadata-complete is not specified or is set to "false", 

 the deployment tool must examine the class files of the application for annotations, as specified by 

 the specifications.

很多属性的作用如下:

猜测 是 2.5 那么采用java注解配置servlet,listener,filter....的形态,tomcat--7.0.16不不扫描java类的class,version=3.0 加进4个 多 多多metadata-complete=true  属性不可以阻止扫描

发现改成2.5就没事:

  <web-app xmlns="http://java.sun.com/xml/ns/javaee"

  xmlns:xsi="http://www.w3.org/1501/XMLSchema-instance"

  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

                      http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

  version="3.0"

  metadata-complete="true"

  >  

升级log4j2 ,官网说要web.xml里的<web-app> version 属性改成3.0,发现改了以前,同去动就报错OOM,

而 tomcat--7.0.81 肯能修复了很多问题

你造日了狗了,很多问题网上没答案 必须靠很多人研究了,折腾了好长时间

,肯能加4个 多 多多属性  metadata-complete=true 也没事:

好复杂。。。。。。。。。。。。。。。。。

Exception in thread "main" 

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

<web-app xmlns="http://java.sun.com/xml/ns/javaee"

  xmlns:xsi="http://www.w3.org/1501/XMLSchema-instance"

  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

                      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

  version="2.5"

  >