У меня проблема показана ниже;
groovy.lang.MissingMethodException: No signature of method:
static org.springframework.security.oauth.User.withTransaction() is applicable for argument types:
(org.springframework.security.oauth.services.UserService$_saveUser_closure1) values:
[org.springframework.security.oauth.services.UserService$_saveUser_closure1@2ed1e8 at
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1357)
UserService:
class UserService {
public boolean saveUser(){
boolean retVal=false;
User.withTransaction{status ->
def sUser = new User()
sUser.setUsername("muhammed")
sUser.save()
retVal= true
}
return retVal;
}
}
User.groovy:
@Entity
class User {
String id;
String username;
String password;//social agent id
static constraints = {
username(nullable:true)
password(nullable:true)
}
static mapping = {
id generator: 'uuid'
}
}
в чем проблема, которую я не могунайти