0

How to set user to the session in bootstrap. I am getting the error

Error initializing the application: No such property: session for class: BootStrap

In bootstrap.groovy

class BootStrap {

    def init = { servletContext ->
        session.loggedInUser = "Anantha"

    }
    def destroy = {
    }
}
4

1 回答 1

2

运行引导程序时,没有会话。每个浏览网站的用户都会生成一个会话

于 2013-07-30T13:44:43.290 回答