Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LenarBad/de2a55c6d88e79ea892658630ef24c76 to your computer and use it in GitHub Desktop.
Save LenarBad/de2a55c6d88e79ea892658630ef24c76 to your computer and use it in GitHub Desktop.
@Component
public class TestData extends FileReader {
@Value("${testData.users.file}")
private String usersFile;
public List<User> getUsers() {
Gson gson = new Gson();
return Arrays.asList(gson.fromJson(getFileAsString(usersFile), User[].class));
}
}
@LenarBad
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment