ubiquibacon
ubiquibacon

Reputation: 10667

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/.

Upvotes: 5

Views: 2311

Answers (1)

Graeme Rocher
Graeme Rocher

Reputation: 7985

You can use src/main/resources

Upvotes: 9

Related Questions