我正在尝试将默认 Spring Security 用户域类的引用添加到另一个应该包含其他用户信息的类。
class User {
transient springSecurityService
String username
String password
boolean enabled
boolean accountExpired
boolean accountLocked
boolean passwordExpired
Profile profile
...
...和...
class Profile {
static constraints = {
}
static belongsTo = [user : User]
String firstName
String lastName
}
从我读到的应该是它的工作方式,但我收到以下错误:
ERROR context.GrailsContextLoader - Error executing bootstraps: null
Message: null
Line | Method
->> 32 | create in com.app.UserRole
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 15 | doCall in BootStrap$_closure1
| 301 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 294 | executeForEnvironment in ''
| 270 | executeForCurrentEnvironment . . in ''
| 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run . . . . . . . . . . . . . . in ''
^ 662 | run in java.lang.Thread
任何的想法?