FilterDispatcher <<< is deprecated! Please use the new filters!

来源:互联网 发布:服务器安装linux系统 编辑:程序博客网 时间:2024/06/06 03:56
将struts2的包从2.1升级到2.3,结果老提示warning如下:

***********************************************************************
*                               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已经过时啦!请使用新的filter!原来配置的org.apache.struts2.dispatcher.FilterDispatcher

从>=2.1.3的版本开始,FilterDispatcher被标记为过时,取而代之的是新的StrutsPrepareAndExecuteFilter
如果你的struts版本大于2.1.3时,filter配置要变成:org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter。

如果是低于2.1.3版本,则还用 org.apache.struts2.dispatcher.FilterDispatcher


相关链接:https://zhidao.baidu.com/question/559062752.html


0 0