I am trying to read and write files directly in my source resources folder.
Watching other questions like Spring Boot access static resources missing scr/main/resources I have been able to get the outputfolder by using ClassPathResource
:
out/resources/sql
Is it possible to get the real resources folder?
/src/test/resources/sql
(I need it for test, thats why I wrote /test/, but I assume that solution for /main/ would also help me)
Note
I understand that for reading it's not a problem, since in runtime I will have anything under src/test/resources. However, for writing it will get overriden everytime I compile the code