一、xml建模
1、ConfigModel(comfig.xml中的config节点模型)
/**
* comfig.xml中的config节点模型
* @author zjjt
*
*/
public class ConfigModel {
//config节点下会有多个action
Map<String,ActionModel> actions = new HashMap<>();
//将解析到action数据放入actions集合中
public void addAction(ActionModel action) {
if(actions.containsKey(action.getPath())) {
throw new RuntimeException("ActionModel[" + action.getPath() + "]已存在");
}
actions.put(action.getPath(), action);
}
//通过指定的path,从actions集合中获取action对象
public ActionModel findAction(String path) {
if(!actions.containsKey(path)) {
throw new RuntimeException("