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

StackOverflow https://stackoverflow.com/questions/17948461

  •  04-06-2022
  •  | 
  •  

문제

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 = {
    }
}
도움이 되었습니까?

해결책

When the bootstrap is run, there is no session. A session is generated per-user browsing the site

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top