开发者

Grails: Get context path in BootStrap.groovy

开发者 https://www.devze.com 2023-02-07 12:51 出处:网络
How can I get the context path in the BootStrap.groovy file of a Grails a开发者_如何学Gopplication?Can\'t you do:

How can I get the context path in the BootStrap.groovy file of a Grails a开发者_如何学Gopplication?


Can't you do:

class BootStrap {
  def init = { servletContext ->
    println "$servletContext.contextPath"
  }
  def destroy = {
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消