• 如何在Grails的Service中调用createLink

    日期:2011-04-25 | 分类:技术

    在Service中调用createLink的可采用以下代码:

    def g = new org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib()

    //获得绝对link为:http://localhost:8080/projectcontext/site/index
    def visitUs = g.createLink(controller: 'site', action: '...