今天在使用最新版Struts2.3.24时,总是报出如下警告:
***********************************************************************
* WARNING!!! *
* *
* >>> FilterDispatcher <<< is deprecated! Please use the new filters! *
* *
* This can be a source of unpredictable problems! *
* *
* Please refer to the docs for more details! *
* http://struts.apache.org/2.x/docs/webxml.html *
* *
***********************************************************************
很显然,FilterDispatcher被标记为deprecated,因此需要用其他类来替换它,解决办法如下:
将FilterDispatcher改为org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter即可^_^