Grails3安装模板只创建一个脚手架目录-没有工件目录

Grails3安装模板只创建一个脚手架目录-没有工件目录,grails,grails-3.1,Grails,Grails 3.1,我想修改的主要模板是工件模板。有人知道如何创建工件模板吗 此外,它仅在scaffolding目录中安装了这三个文件: AsyncController.groovy、AsyncSpec.groovy、ScaffoldController.groovy。事实上,安装模板命令存在问题。在GrailsVersion3.1中,它没有像预期的那样创建包含视图页面(gsp)的工件目录 您只需创建一个工件目录并将自定义视图页面放入其中: /$YOUR_GRAIL_APP_DIR/src/main/templat

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

此外,它仅在scaffolding目录中安装了这三个文件:
AsyncController.groovy、AsyncSpec.groovy、ScaffoldController.groovy。

事实上,安装模板命令存在问题。在GrailsVersion3.1中,它没有像预期的那样创建包含视图页面(gsp)的工件目录

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

/$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
问候,


--Sylvio

即使添加了这些,grails generate all或generate View也会忽略它们。解决方案是回到脚手架3.1.3和Grails3.0.9。这适用于安装模板和生成-*。@ChrisMalan-即使使用Garils 3.0.9,它也只创建脚手架(main/templates/scaffolding)。它不会创建工件。