读取配置文件并中文输出

 public static void main(String[] args) throws Exception {
 //resource目录下
    String path = "code.properties";
    EncodedResource encodedResource = new EncodedResource(new ClassPathResource(path),
        Charsets.UTF_8);

    Properties properties = PropertiesLoaderUtils.loadProperties(encodedResource);

    String property = properties.getProperty("audit.ios_cvs_http_protocol.name");
    System.out.println(property);
    
  }
©️2020 CSDN 皮肤主题: 游动-白 设计师:上身试试 返回首页