Grails 3 install-templates 仅创建脚手架目录 - 没有工件目录

标签 grails grails-3.1

我要修改的主要模板是工件模板。有人知道如何创建工件模板吗?

另外,它只在脚手架目录下安装了这三个文件: AsyncController.groovy、AsyncSpec.groovy、ScaffoldedController.groovy。

最佳答案

事实上,install-template命令有问题。在 Grails 版本 3.1 中,它不会按预期创建带有 View 页面 (gsp) 的工件目录。

您只需创建一个工件目录并将自定义 View 页面放入其中即可:

/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/create.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/edit.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/index.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/show.gsp

问候,

--西尔维奥

关于Grails 3 install-templates 仅创建脚手架目录 - 没有工件目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35189479/

相关文章:

javascript - 将数据从.gsp发送到 Controller

grails - 拦截器可以在认证和 Action 执行之间执行吗?

grails 错误 : grails. 验证。Validateable 不是 @grails.validation.Validateable 中的注释

grails - Grails:更改输入后如何触发提交或号召性用语

tomcat - Grails 3.1.4 应用程序部署错误

grails - 一对一求和

grails - ElasticSearch插件导致服务器在Grails 3.1.6中停止

spring - Grails 3 REST-API匿名访问被ExceptionTranslationFilter拒绝

grails - Gradle 相当于 'grails -Dgrails.env=production run-app'

grails - 如何重用 Grails 应用程序的域类?