Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to access web-app folder files in Grails 3

I am not able to access web-app folder files in Grails 3. I have robots.txt in the web-app folder and in Grails 2 I was able to access it directly at http://localhost:8080/robots.txt. After migrating to Grails 3 I am not able to access it anymore at http://localhost:8080/robots.txt.

How can I make these files accessible again?

like image 459
naresh Avatar asked Jun 14 '16 10:06

naresh


1 Answers

See https://github.com/grails/grails-core/releases/tag/v3.0.12 and part Location of static resources

In Grails 3 you can store your files under src/main/resources. You can access them by filename preceded with static for example http://localhost:8080/static/robots.txt.

This path can be changed using config option as defined in attached URL

like image 137
droggo Avatar answered Sep 24 '22 23:09

droggo