public static Properties getProperties(String propertiesFileName)
			throws IOException {
		InputStream in = null;
		Properties p = null;
		File configFile = null;

		/*** 当前路径的上一级找配置文件路径 ****/
		Properties props = System.getProperties();
		String userDir = props.getProperty("user.dir");
		configFile = new File(propertiesFileName);
		log.info("Config path=" + configFile.getAbsolutePath());
		// System.out.println("Config path="+configFile.getAbsolutePath());
		if (configFile.exists() == false) {
			String path = new File(userDir).getParentFile().getAbsolutePath()
					+ separator + "conf" + separator + propertiesFileName;
			log.info("properties path:" + path);
			configFile = new File(path);
			if (configFile.exists() == false) {
				log.fatal("Config file does not exist["
						+ configFile.getAbsolutePath() + "]");
				if (configFile.createNewFile())
					log.info("Create Config File["
							+ configFile.getAbsolutePath() + "] Success");
				else {
					log.fatal("Create Config File["
							+ configFile.getAbsolutePath() + "] Failed");
					return null;
				}
			}
		}
		p = new Properties();
		in = new BufferedInputStream(new FileInputStream(configFile
				.getAbsolutePath()));
		p.load(in);
		in.close();
		return p;
	}