struts.xml文件
struts.xml文件里的action可以分離出來浩蓉,如:
注:?include是放在標簽的前面
在src下面新建?package?名為:config.struts,再新建xml文件為warningInformAtion-struts.xml,這樣,我們就可以把預警信息監(jiān)測的action全放在warningInformAtion-struts.xml里面了
warningInformAtion-struts.xml的內容如下:
/next/warningInformation.jsp
applicationContext.xml文件
applicationContext.xml的bean可以分離出來,如:
注:import是放在標簽前面的
在src下面新建?package?名為:config.bean,再新建xml文件為warningInformation-bean.xml叁丧,這樣众辨,我們就可以把預警信息監(jiān)測的bean全放在warningInformation-bean.xml里面了
warningInformation-bean.xml內容如下:
? ? xmlns="http://www.springframework.org/schema/beans"? ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"? ? xmlns:p="http://www.springframework.org/schema/p"? ? xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">