我刚开始玩的Grails和简单的注册/登录功能工作。 我有这个简单的域对象:Jasypt加密领域和标准API没有得到结果(Grails的)
class Person {
String firstName, lastName, email
String login, password
static constraints = {
firstName nullable: true
lastName nullable: true
}
static mapping = {
password type: GormEncryptedStringType
}
}
我节省Person对象就好了。但后来当我试图找回它使用标准API登录的目的,也不会找到它:
def criteria = Person.createCriteria()
def person = criteria.get {
and {
eq("login", params.login)
eq("password", params.password)
}
}
如果我删除eq("password", params.password)
或将它更改为不加密的它工作得很好。任何人都有一个想法如何处理?