1. 程式人生 > >java EE加載peoperties配置文件

java EE加載peoperties配置文件

redis jedis block int prope true ted source ade

//加載配置文件
		InputStream in = JedisUtils.class.getClassLoader().getResourceAsStream("redis.properties");
		Properties properties =new Properties();
		try {
			properties.load(in);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

java EE加載peoperties配置文件