升级log4j2,tomcat

  • 时间:
  • 浏览:1

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

  xmlns:xsi="http://www.w3.org/30001/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"

  >  

,但会 加另另有有1个属性  metadata-complete=true 也没事:

改成3.0  tomcat--7.0.16就会去扫描哪些地方地方有servlet注解的 class,但会 在你四种 过程中因为了OOM

但会 ,去掉 tomcat-7.0.81也没事,

发现改成2.5就没事:

你造日了狗了,你四种 问题报告 网上没答案 不不能靠当时人研究了,折腾了好长时间

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.

你四种 属性的作用如下:

升级log4j2 ,官网说要web.xml里的<web-app> version 属性改成3.0,发现改了刚刚,一块儿动就报错OOM,

而 tomcat--7.0.81 但会 修复了你四种 问题报告

好简化。。。。。。。。。。。。。。。。。

猜测 是 2.5 不不能 采用java注解配置servlet,listener,filter....的社会形态,tomcat--7.0.16不不扫描java类的class,version=3.0 去掉 另另有有1个metadata-complete=true  属性不能阻止扫描

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

  xmlns:xsi="http://www.w3.org/30001/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"

  >  

Exception in thread "main" 

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