以下内容皆针对grails1.0.3,其他版本是否有问题待验证。
1) bug:
url解析问题:
/show/xxx.yyy 这样的url解析之后,params.id 值为 xxx而不是 xxx.yyy。
暂时以 /show?id=xxx.yy 这样的方式来解决。
应该是 org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter中的bug,不知道新版本fix了没有
2) beforeUpdate 的问题
访问类中属性必须加上 this关键字,这个真的感觉有些莫名其妙,先记下来以后解决吧。
class User {
int id
String name
def beforeUpdate = {
println ("beforeUpdate, id=" + id + ",this.id=" + this.id);
}
}
打印的结果是:
beforeUpdate, id=null,this.id=1
分享到:
相关推荐
主要讲述futex技术的实现,futex是linux底层锁机制实现的基石,值得一看
Tricky_Issues_and_Practical_Guidance_in_Medical_Device_Cybersecurity 金融安全 网络信息安全 数据分析 安全建设 安全开发
Tricky-Track-3D
然后tricky_signals是您的朋友! 安装 将此行添加到您的应用程序的Gemfile中: gem 'tricky_signals' 然后执行: $ bundle 或将其自己安装为: $ gem install tricky_signals 用法 全局陷阱处理程序 logger = ...
用于ms Windows操作系统的小实用程序的集合,打包为易于使用的无安装程序。 它包括目录占用浏览器,cd目录,媒体播放器和一些有用的注册表技巧。
c_tricky_questions:c预测输出程序
此存储库的目的是用代码补充视频。 如果您正在学习“”,那么在我们介绍了原语和运算符之后,棘手的 Java 数字内容是一个很好的话题。 当他们学习计算机时,我告诉每个人的一课是“计算机做你告诉他们做的事情,而...
高二英语上学期第一次联考试题.doc
Too often design patterns are explained using tricky concepts, when in fact they are easy to use and can enrich your everyday development. Design Patterns in PHP and Laravel aims to break down tricky ...
A First Course in Mathematical Analysis Mathematical Analysis (often called...through the tricky points. It is suitable for self study or use in parallel with a standard university course on the subject.
Because it's entirely user driven, tricky objects are no problem. Make robust colliders for hollow objects, spindly objects, arches and other awkward shapes easily. Zero Overhead No components ...
bazel-multiversion 支持相同的3rdparty依赖关系的多个版本的bazelbuild / rules_jvm_external的替代方案。入门# Step 1: Clone repogit clone ...
This book teaches you design patterns in PHP and Laravel using real-world examples and plenty of humor. Too often design patterns are explained using tricky concepts, when in fact they are easy to use...
They can be tricky to use, and this book will help you deftly navigate the terrain. You'll discover how to write straightforward code that avoids duplication and clarifies your intentions. You'll ...
But statistical analysis is tricky to get right, even for the best and brightest of us. You'd be surprised how many scientists are doing it wrong. Statistics Done Wrong is a pithy, essential guide ...
Angular is a rich and feature-filled framework, but that also means it can be tricky to understand all of its parts. In this book, we’ll walk through everything from installing the tools, writing ...
though, is tricky to do right, and it usually has to be built into your code from Day 1. This book discusses the things you need to know to program threads effectively in the real world, focusing on ...
main benefit of window functions is the ease in which you can solve these tricky queries. Most of the time, you also realize a big boost in performance over the older methods. You can often use a ...
嵌入 Flash 相当于嵌入一个 ActiveX 控件,在嵌入过程中也有一些比较 Tricky 的地方需要注意,下面就在 WPF Application 中嵌入 Flash 控件的步骤进行简要说明,并将遇到的一些需要注意的问题进行提示。 开发环境 ...