由于控制台日志,Struts 2页变慢

时间:2016-04-03 09:08:07

标签: logging struts2 log4j

我通过将以下常量放在struts.xml中来禁用struts 2的dev模式:

<constant name="struts.devMode" value="false" />

我还在log4j.properties中设置了日志级别:

 log4j.logger.org.apache=ERROR
 log4j.logger.com.opensymphony.xwork2=ERROR
 log4j.logger.ognl=ERROR
 log4j.logger.freemarker=ERROR

但是,我的页面加载非常慢,并且可以在控制台上看到很多mime类型的输出:

 <mime-mapping>
 <extension>pptm</extension>
 <mime-type>application/vnd.ms-  powerpoint.presentation.macroenabled.12</mime-type>
</mime-mapping>

<welcome-file-list>
<welcome-file>/redirect.jsp</welcome-file>
</welcome-file-list>
15:53:28.524 [http-bio-8080-exec-1] DEBUG c.o.x.conversion.impl.XWorkConverter - falling back to default type converter   [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter@3810f3d8]
15:53:28.524 [http-bio-8080-exec-1] DEBUG org.apache.struts2.components.UIBean - Rendering template /template/xhtml/form-close
15:53:28.552 [http-bio-8080-exec-1] DEBUG o.a.s.c.t.FreemarkerTemplateEngine - Rendering template /template/xhtml/form-close.ftl
15:53:28.632 [http-bio-8080-exec-1] DEBUG c.o.x.interceptor.I18nInterceptor - after Locale=en_US
15:53:28.636 [http-bio-8080-exec-1] DEBUG c.o.x.interceptor.I18nInterceptor - intercept } 
15:53:28.637 [http-bio-8080-exec-1] DEBUG o.s.o.h.s.OpenSessionInViewFilter - Closing Hibernate Session in OpenSessionInViewFilter
15:53:28.641 [http-bio-8080-exec-1] DEBUG o.s.s.w.a.ExceptionTranslationFilter - Chain processed normally
15:53:28.643 [http-bio-8080-exec-1] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
15:53:28.643 [http-bio-8080-exec-1] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed

0 个答案:

没有答案