Created
March 1, 2020 09:44
-
-
Save bruskiza/3eb7f0f75191cc2b19a754d413ea5915 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
@Scheduled(fixedRate = 5000) | |
public void doSomething() throws Exception { | |
log.info("Scheduled task run..."); | |
File resource = new ClassPathResource("static/index.html").getFile(); | |
String time = String.valueOf(Instant.now().toEpochMilli()); | |
StringBuilder sb = new StringBuilder(); | |
sb.append("<p>"); | |
sb.append(time); | |
Files.write(resource.toPath(), sb.toString().getBytes()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment