In Grails 3.0 how do you map a URL to a file under the assets folder?
For example:
http://localhost:8080/favicon.ico --> grails-app/assets/images/bookmark.ico
I've tried a few test mappings, such as:
grails-app/controllers/UrlMappings.groovy
class UrlMappings {
static mappings = {
...
"/t1.png" (uri: "/assets/images/test.png")
"/t2.png" (uri: "/assets/test.png")
"/t3.png" (uri: "/images/test.png")
"/t4.png" (dir: "assets/images", file: "test.png")
...
}
}
...but they all result in a 500 server error.
I think you need to map the URL to AssetController of the Asset Plugin, like this (not tested):
HTH