解决properties相关的中文处理乱码问题
2017-08-30 00:00
274 查看
1、properties 文件中文乱码问题
鼠标“右击”文件 => Resource => Text file encoding => UTF-8
2、properties 文件解析中文乱码问题
Properties pps = new Properties();
pps.load(new InputStreamReader(TestProperty.class.getClassLoader().getResourceAsStream(“properties”), “UTF-8”));
3、log4j解析properties 中文乱码问题
Logger logger = Logger.getLogger(“test-log”);
Properties pps = new Properties();
pps.load(new InputStreamReader(MvneLog.class.getClassLoader().getResourceAsStream(“log4j.properties”), “UTF-8”));
PropertyConfigurator.configure(pps);
鼠标“右击”文件 => Resource => Text file encoding => UTF-8
2、properties 文件解析中文乱码问题
Properties pps = new Properties();
pps.load(new InputStreamReader(TestProperty.class.getClassLoader().getResourceAsStream(“properties”), “UTF-8”));
3、log4j解析properties 中文乱码问题
Logger logger = Logger.getLogger(“test-log”);
Properties pps = new Properties();
pps.load(new InputStreamReader(MvneLog.class.getClassLoader().getResourceAsStream(“log4j.properties”), “UTF-8”));
PropertyConfigurator.configure(pps);
相关文章推荐
- spring boot使用i18n时properties文件中文乱码问题的解决方法
- 详解Intellij IDEA中.properties文件中文显示乱码问题的解决
- Intellij IDEA 中 .properties文件中文显示乱码问题的解决
- spring使用@Value标签读取.properties文件的中文乱码问题的解决
- 安装Properties Editor插件,解决XXX.properties文件中文乱码的问题
- spring使用@Value标签读取.properties文件的中文乱码问题的解决
- Java读写.properties文件实例,解决中文乱码问题
- Java读取properties文件中文乱码问题的解决
- Java读取properties文件中文乱码问题解决
- ApplicationResources.properties文件中文乱码问题的解决
- Java读properties文件中文乱码问题的解决方法
- properties 中文乱码问题的解决
- 解决Java读取properties文件中文乱码的问题
- Java读取properties文件中文乱码问题解决
- spring使用@Value注解读取.properties文件时出现中文乱码问题的解决
- Java读取properties文件中文乱码问题解决
- Javascript escape 解决 Jquery Ajax 异步请求 URL中文传参乱码问题 一般处理程序Handler获取参数
- 解决使用Properties,读取中文乱码问题
- java读取.properties文件及解决中文乱码问题
- struts2的中文乱码处理,struts出现中文乱码怎么处理.如何解决struts的中文乱码问题?