eclipsespring-boot

Refresh Folder in spring boot after uploading a file


I upload a file using my spring boot Application in the path : C:\Users\myPC\eclipse-workspace\myPROJECT\src\main\resources\static\files\

The probleme is that the url : http://localhost:8088/files/file_example.png not working unless i refresh the folder src/main/ressources/static/files manually from Eclipse IDE.

I search in web about this probleme but i found nothing to fix it.

Any help would be appreciated.

Thanks.


Solution

  • If you are working with Eclipse, such as my case, go to Window -> Preferences and search for workspace, then check Refresh using native hooks or polling.

    it worked for me.