Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to place resources in Grails 3 project?

This answer addresses this problem for a Grails 2 project, but does not work for a Grails 3 project. For instance, in a Grails 2 project I was able to put an xsl file in /src/groovy/myapp/resources/ and load it similar to what the linked answer suggested...

this.class.getClassLoader().getResourceAsStream("myapp/resources/my_xsl.xsl") // Returns an java.io.InputStream

...but that does not work for Grails 3 when the same file is placed in src/main/groovy/myapp/resources/.

like image 891
ubiquibacon Avatar asked May 14 '15 13:05

ubiquibacon


1 Answers

You can use src/main/resources

like image 157
Graeme Rocher Avatar answered Oct 02 '22 13:10

Graeme Rocher