private static void loadComponents(AutoCodeConfig autoCodeConfig,Map variables) throws InvalidPropertiesFormatException {
        if(variables == null || variables.get("component") == null){
            throw new InvalidPropertiesFormatException("Can't find any component!");
        }
        if(!(variables.get("component") instanceof Map)){
            throw new InvalidPropertiesFormatException("Component config error!");
        }
        Map componentMap = (Map)variables.get("component");
        for(Map.Entry<String,Map> entry : (Set<Map.Entry<String,Map>>)componentMap.entrySet()){
            if(entry.getValue()!= null &&(entry.getValue() instanceof  Map)){
                autoCodeConfig.addComponent(entry.getKey(),buildComponent(entry.getKey(),entry.getValue()));
                //把component加入根结构中，方便模板调用
                variables.put(entry.getKey(),entry.getValue());
            }
        }
    }