我想要修改的主要模板是工件。任何人都知道如何创建工件模板?
另外,它只在脚手架目录中安装了这三个文件: AsyncController.groovy,AsyncSpec.groovy,ScaffoldedController.groovy。
答案 0 :(得分:2)
实际上,install-template命令存在问题。在Grails 3.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