Created
May 6, 2018 17:12
-
-
Save nkonev/bc947768ddecb6abd920d12a47b5d753 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Value("classpath:ololo.properties") | |
| //@Value("file:/home/nik/ideaWorkspace/blog/backend/src/main/resources/ololo.properties") | |
| Resource resource; | |
| @GetMapping(value = "/ololo", produces = TEXT_HTML_VALUE) | |
| public String getOlolo() throws IOException { | |
| try(BufferedReader br = new BufferedReader(new InputStreamReader(resource.getInputStream()));) { | |
| return br.lines().collect(Collectors.joining("\n")); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment