public static void init(String tempPath) {
		if (!isInit) {
			cfg = new Configuration();
			cfg.setEncoding(Locale.CHINA, "UTF-8");// 设置字符集
			String configPath = null;
			if(tempPath != null && !"".equals(tempPath)){
				configPath = tempPath;
			}else{
				WebContentPath = getWebcontentPath();
				configPath = WebContentPath + templateDir;
			}
			try {
				cfg.setDirectoryForTemplateLoading(new File(configPath));
				isInit = true;
			} catch (Exception e) {
				e.printStackTrace();
				log.error("配置模板出错,模板根路径："+ WebContentPath, e);
			}
		}
	}