How do I call a Grails service from a gsp?

后端 未结 4 773
一整个雨季
一整个雨季 2020-12-05 02:33

How can I invoke a service directly from a view? I\'m trying with ${my.domain.service.method}, but it complains it can\'t find the property.

And no, I

4条回答
  •  萌比男神i
    2020-12-05 03:21

    Try this - much helpful

    %{--Use BlogService--}%
    
    
    
    • ${title}

    Refer this

    Also this is not a recommened thing, you can always use taglib

提交回复
热议问题