Where to place resources in a Grails project?

I am wondering if there is room for resource files in a Grails application? I have a csv file that is uploaded to the map (nothing significant), but did not quite know where to put it in the project.

So my question is: is there a place in the project to host this file? (If so, where?) Or is it better to place it outside the project?

+6
source share
1 answer

If csv needs to be updated from time to time, I would add it to my grails folder and point to it from config.groovy.

If it is basically a static file, I would put it in src / java / resources and load it with something like this.class.getResource ("/resources/file.csv"), as with a regular java application

+4
source

Source: https://habr.com/ru/post/888676/


All Articles