spring.resources.static-locations code example
Example 1: spring boot save file to static folder
String fileLocation = new File("src\\main\\resources\\static\\uploads").getAbsolutePath() + "\\" + fileName;
FileOutputStream output = new FileOutputStream(fileLocation);
output.write(imagem.getBytes());
output.close();
Example 2: how to register a static assets folder spring boot
spring.resources.static-locations=classpath:/files/,classpath:/static-files