在struts2的配置文件struts.xml文件中增加 <struts><constant name="struts.devMode" value="true"></constant></struts> 内容,就可以在开发阶段动态改变配置文件信息,不用再重新启动服务。