gpt4 book ai didi

grails - 在grails应用程序中看不到创建的脚手架代码

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

I have a domain class which is

class Person{
int age
String firstName
String lastName
}

and I have a controller class which is person controller

class PersonController{
static scaffold=true
...
}

scaffold = true应该使用其所有 View 创建所有crud操作,但是我无法在应用程序中看到创建的代码,并且在sampleapplication-> views-> person下找不到任何 View 页面。但是当我运行该应用程序时工作正常。但我想查看创建的代码以及创建的 View 文件

最佳答案

static scaffold=true 

在运行时创建 View 和 Controller 。

如果要查看代码,则必须使用以下命令:
grails generate-all Person

在这里阅读更多:

http://grails.org/doc/latest/guide/scaffolding.html

关于grails - 在grails应用程序中看不到创建的脚手架代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24359691/

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