Why does grails-2.0.1 fail to create User, Role and UserRole domain objects in the BootStrap class init method?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hi, I am new to the Grails platform... I could create the User, Role and UserRole domain objects in the BootStrap class init method in the grails-1.3.7 version with the Spring Security Core Plugin ... But can not do the same in the grails-2.0.1 version.. Following is the code that I'm trying to execute ... import com.beshto.Role import com.beshto.User import com.beshto.UserRole import grails.util.Environment class BootStrap { def init = { servletContext -> switch (Environment.current) { case Environment.DEVELOPMENT: