首页>代码>java用apache poi实现将图片插入到指定的表格中>/excelExervcise/src/com/excel/SysConfig.java
package com.excel;

import java.util.Locale;
import java.util.MissingResourceException;

/**
 * 获取工程配置文件键值信息类
 * <p>
 * 
 * @author fly
 */
public class SysConfig {
	private static boolean isInit = false;

	private static String fileName = "fileConfig";
	private static java.util.ResourceBundle rb;

	private static void init() {
		if (isInit) return;
		rb = java.util.ResourceBundle.getBundle(fileName, Locale.CHINA);
		isInit = true;
	}

	/**
	 * 根据键名获取值
	 * 
	 * @param name
	 * @return
	 * @throws Exception
	 */
	public static String getProperty(String key) {
		String value = "";
		init();
		if (key == null || "".equals(key)) return "";

		try {
			value = rb.getString(key);
		}
		catch (MissingResourceException e) {
			e.printStackTrace();
		}

		return value;
	}
}
最近下载更多
kuntay  LV1 2022年2月24日
asdsasddas  LV6 2021年9月14日
1358849392  LV21 2019年12月26日
zuopizi  LV1 2019年10月7日
doutao6677  LV25 2019年8月5日
john93  LV15 2018年12月11日
HelloWorld_123  LV1 2018年10月24日
扎一个  LV1 2018年8月20日
arashiaa  LV1 2018年8月15日
丶知北游丿  LV9 2018年7月23日
最近浏览更多
qwertyui惊鸿  LV7 2023年3月17日
java小书童  LV17 2023年2月27日
kuntay  LV1 2022年2月24日
asdsasddas  LV6 2021年9月14日
ewan007  LV29 2021年7月22日
iRichard1314  LV6 2021年7月19日
x2b2d2  LV12 2021年7月10日
225443  LV4 2021年6月25日
shen779  LV1 2021年3月16日
jstzli  LV2 2020年11月8日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友