Can I use grails tag outside of GSP?

前端 未结 4 864
忘了有多久
忘了有多久 2020-12-09 10:24

For example, i can put

  

inside a .gsp file and it will work nicely.

Bu

4条回答
  •  生来不讨喜
    2020-12-09 11:15

    The native way to do this as of Grails 2.0 outside of controllers (so for services, async jobs, etc) is to use the LinkGenerator class. Works everywhere and mentioned in the official docs. See example here

    http://mrhaki.blogspot.ca/2012/01/grails-goodness-generate-links-outside.html

提交回复
热议问题