Grails 动态脚手架不';不工作
我有一个类似这样的域:Grails 动态脚手架不';不工作,grails,scaffold,Grails,Scaffold,我有一个类似这样的域: package helloworld class User { String name int tuoi String ho static constraints = { } } 以及控制器: package helloworld class UserController { def scaffold = true } 运行project并浏览到localhost:8080/hello
package helloworld
class User {
String name
int tuoi
String ho
static constraints = {
}
}
以及控制器:
package helloworld
class UserController {
def scaffold = true
}
运行project并浏览到localhost:8080/helloworld/user/之后,我只得到一个空白页面。为什么不显示插件scaffold创建的页面?我使用的是grails 2.4.4和jdk 1.7版UserController是否遵循与User domain类相同的命名约定??感谢abdullah,我认为它确实如此,而且您的
BuildConfig.groovy
中肯定列出了scaffold
插件?名为scaffold
的实例字段不会起任何作用,它需要在课堂上可用。更好:static scaffold=true
Best:static scaffold=User
但是如果您的页面没有被搭建,那么您得到的是一个空白页面而不是404,这表明您可能有其他问题。有相关的日志信息吗?