从properties配置中获取值
1. 创建一个properties文件
2. 测试代码
public class ResourceTest {
//测试ResourceBundle.getBundle
public static void main(String[] args) throws UnsupportedEncodingException {
System.out.println("测试resoucebundle");
ResourceBundle bundle = ResourceBundle.getBundle("config/test");
String str = bundle.getString("bb");
//解决中文乱码问题
String str1 = new String(bundle.getString("bb").getBytes("ISO-8859-1"),"utf-8");
System.out.println(str);
System.out.println(str1);
}