Where do I put resources in a Grails 3 project?
This answer solves this issue for a Grails 2 project, but does not work for a Grails 3 project. For example, in a Grails 2 project, I was able to put an xsl file in /src/groovy/myapp/resources/
and download it, similar to what the linked answer suggested ...
this.class.getClassLoader().getResourceAsStream("myapp/resources/my_xsl.xsl") // Returns an java.io.InputStream
... but that doesn't work for Grails 3 when the same file is placed in src/main/groovy/myapp/resources/
.
+3
source to share