我有一个正在使用 Hibernate 和 Struts2 的项目,而且我对它们都是新手。
它工作正常,但我仍然有那些警告
mai 19, 2014 4:56:57 PM com.opensymphony.xwork2.ognl.OgnlValueStack warn
WARNING: Could not find property [templateDir]
mai 19, 2014 4:56:58 PM com.opensymphony.xwork2.ognl.OgnlValueStack warn
WARNING: Could not find property [struts.actionMapping]
关于如何消除警告有什么建议吗?
最佳答案
从旧的Troubleshooting guide migrating from Struts 2.0 to 2.1 :
Reduce verbose logging
Struts 2.1 introduces more verbose logging than Struts 2.0. While extremely valuable, some users may find these annoying.
Missing Properties
This message states that the framework searched for a property in the value stack and failed to find it.
2008-04-19 14:21:08,177 WARN [http-8443-Processor25] [OgnlValueStack] Could not find property [templateDir] 2008-04-19 14:21:08,177 WARN [http-8443-Processor25] [OgnlValueStack] Could not find property [templateDir] 2008-04-19 14:21:08,177 WARN [http-8443-Processor25] [OgnlValueStack] Could not find property [templateDir] 2008-04-19 14:21:08,178 WARN [http-8443-Processor25] [OgnlValueStack] Could not find property [org.apache.catalina.jsp_file]
To hide these messages, turn off the WARN level logging for OgnlValueStack.
eg. Include a new limit category in your log4j.xml file (only log errors or worse):
<category name="com.opensymphony.xwork2.ognl.OgnlValueStack"> <priority value="error"/> </category>
关于hibernate - Struts2警告: Could not find property,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23742418/