gpt4 book ai didi

grails - 使用Grails在Linux环境中不显示 bool 值

转载 作者:行者123 更新时间:2023-12-02 15:21:30 25 4
gpt4 key购买 nike

我正在使用Grails 2.4.0.and创建一个应用程序并在Linux上进行部署。

我的域名是

class UserDetails {

String userEnvironment = ""
Long userId = 0L
Boolean accountCreated = false
Integer retries = 0
String password = ""
boolean accountCreationInProgress = true

static constraints = {
accountCreationInProgress nullable : true
}

}

在Windows上保存其工作正常时,但是在Linux上,accountCreated和accountCreationInProgress列为空白。为什么不知道

有人请帮帮我。

最佳答案

改成:

class UserDetails {

StringuserEnvironment = ""
LonguserId= 0L
Boolean accountCreated= false
Integer retries = 0
Stringpassword= ""
Boolean accountCreationInProgress = true

static constraints = {
//there is no point to use nullable for accountCreationInProgress if you set it default to true value during create
}

}

在重新运行应用程序之前,请记住将表删除到数据库中。

关于grails - 使用Grails在Linux环境中不显示 bool 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35226187/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com