isi*_*lva 26 grails
如何在grails控制台中获取服务?我的业务规则是在服务中实现的,但我无法在grails控制台中访问它们.有谁知道如何帮助我?
Bur*_*ith 40
Spring ApplicationContext可以作为ctx控制台中的变量使用,您可以使用它来访问Spring bean,例如服务.通常情况下,def myService = ctx.getBean('myService')Grails会添加元类助手,因此您可以这样做def myService = ctx.myService
ApplicationContext
ctx
def myService = ctx.getBean('myService')
def myService = ctx.myService
归档时间:
13 年,5 月 前
查看次数:
4572 次
最近记录:
12 年,9 月 前