1 确认properties文件的编码是utf-8
2 采用流的方式读取文件,设置编码为utf-8
public class ErrorCodeConfig { static Properties props; static { InputStreamReader isr = null; try { isr = new InputStreamReader(ErrorCodeConfig.class.getClassLoader().getResourceAsStream("config/XXXErrCode.properties"),"utf-8"); props = new Properties(); props.load(isr); } catch (Exception e) { e.printStackTrace(); } } public static String getErrorCodeDesc(String errCode) { String errorDescString = props.getProperty(errCode, ""); return errorDescString; } public static void main(String[] args) { String desc = getErrorCodeDesc("403"); System.out.println(desc); } }