0
嗨,我已經安裝了grails secuirty插件。
但我無法登錄我已經在Bootstrap中設置了這個用戶名和密碼。Grails安全插件
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
}
}