2007-10-09
grails 模板
关键字: grails,groovy
在使用grails的command来开发程序的时,经常使用的命令有
grails create-domain-class | create-controller 等
这些命令产生的 Domain 和 Controller 不是很有用,也就是说,不能够定制我们需要的
这个时候,template就起作用了
具体使用
1)
grails create-domain-class | create-controller 等
这些命令产生的 Domain 和 Controller 不是很有用,也就是说,不能够定制我们需要的
这个时候,template就起作用了
具体使用
1)
grails install-templates
2)在你的应用程序的src目录下面就有了templates
修改controller对应的就是 artifacts\Controller.groovygroovy 原始代码
- class @artifact.name@ {
- def index = { }
- }
修改成我么需要的就可以java 代码
- class @artifact.name@ extends YourController{
- def index = { }
- }
这样,生产的 Domain Class就有了
使用起来
- 23:16
- 浏览 (560)
- 评论 (1)
- 分类: grails
- 发布在 Groovy on Grails 圈子
- 相关推荐
发表评论
- 浏览: 15903 次
- 性别:

- 来自: 济南

- 详细资料
搜索本博客
我的相册
detail
共 1 张
共 1 张
最新评论
-
grails 根据数据库自动生 ...
不错,不知道实践结果感觉如何,呵呵
-- by casephoen -
grails 导出 excel
你确认在你的controller中定义这个XlsExportService 吗 ...
-- by dellsoft -
grails 导出 excel
不能执行:java.lang.NullPointerException: Can ...
-- by ourfirebird -
jsecurity 资料
一直在关注中,其基于pojo的特性还是很诱人的.
-- by agile_boy -
extjs dwr spring
谢谢,学习,学习
-- by fang_qi






评论排行榜