对静态变量的访问被阻止

Access to static variable is blocked

在我的 Struts2 应用程序中,它涉及一些多线程,我在日志中收到以下警告:

Access to static [private static final java.lang.String ...] is blocked!

这个警告是什么意思,我该如何避免?

默认禁用静态访​​问。 您可以了解有关静态访问器的更多信息。

OGNL allows execution of methods, but the static access is disabled by default, so you cannot use static method in expressions. However, you can teach OGNL which classes needs to access the static methods.