1
如何在Grails應用程序的BootStrap.groovy文件中獲取上下文路徑?Grails:在BootStrap.groovy中獲取上下文路徑
如何在Grails應用程序的BootStrap.groovy文件中獲取上下文路徑?Grails:在BootStrap.groovy中獲取上下文路徑
不能這樣做:
class BootStrap {
def init = { servletContext ->
println "$servletContext.contextPath"
}
def destroy = {
}
}