Skip to content

Instantly share code, notes, and snippets.

@yanhua365
Created November 26, 2013 02:52
Show Gist options
  • Save yanhua365/7652773 to your computer and use it in GitHub Desktop.
Save yanhua365/7652773 to your computer and use it in GitHub Desktop.
用Guava实现一行代码从classpath中读取文件内容
String json = Resources.toString(Resources.getResource("com/mycompany/test/fixture/config_fixture.json"), Charsets.UTF_8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment