我想要修改的主要模板是工件.任何人都知道如何创建工件模板?
此外,它只在脚手架目录中安装了这三个文件:AsyncController.groovy,AsyncSpec.groovy,ScaffoldedController.groovy.
小智 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
Run Code Online (Sandbox Code Playgroud)
问候,
——西尔维奥
| 归档时间: |
|
| 查看次数: |
398 次 |
| 最近记录: |