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?
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
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