I am wondering if there is a designated place for resource files in a Grails application? I have a csv file that gets loaded into a map (nothing major) but didn't quite know where to put it in the project.
So my question is, is there a dedicated place in the project to place this file? (If so, where?) Or is it better to place it outside of the project?
If the csv is going to need updating from time to time, I'd put it external to your grails folder, and point to it from config.groovy.
If it's basically a static file, I'd put it in src/java/resources, and load it with something like this.class.getResource("/resources/file.csv") as you would with a regular java app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With