嗨,我已经安装了 grails secuirty 插件。
但是我无法登录我已经在 Bootstrap 中设置了这个用户名和密码。
import dashboard.Role
import dashboard.Username
import dashboard.UsernameRole
class BootStrap {
def init = { servletContext ->
def adminRole = new Role(authority: 'ROLE_ADMIN').save(flush: true)
def usernameRole = new Role(authority: 'ROLE_USER').save(flush: true)
def Username = new Username(username: 'me', enabled: true, password: 'password')
Username.save(flush: true)
UsernameRole.create Username, adminRole, true
}
}