摘要: 转自:http://www.iteye.com/topic/1122629总论无疑问的,spring security在怎么保护网页应用安全上做得很强很周全,但有些地方还是很差强人意,比如对<http/>这个标签,对auto-config="true"与use-expressions="true"的描述和关系辨析上,就语焉不详。升级到3.1版本后,居然发现有莫名奇妙的错误,比如无法解析'ROLE_ADMIN'这样的标准配置,或者报:引用 Field or property cannot be found on object o 阅读全文
posted @ 2013-01-10 22:31 horizon~~~ 阅读(7244) 评论(0) 推荐(0) 编辑
摘要: distinct这个关键字用来过滤掉多余的重复记录只保留一条,但往往只用它来返回不重复记录的条数,而不是用它来返回不重记录的所有值。其原因是distinct只有用二重循环查询来解决,而这样对于一个数据量非常大的站来说,无疑是会直接影响到效率的。例子:table表:字段1 字段2id name1 a2 b3 c4 c5 b库结构大概这样,这只是一个简单的例子,实际情况会复杂得多。比如想用一条语句查询得到name不重复的所有数据,那就必须使用distinct去掉多余的重复记录。select distinct name from table;得到的结果是:----------na... 阅读全文
posted @ 2013-01-10 00:43 horizon~~~ 阅读(2339) 评论(0) 推荐(0) 编辑
摘要: 方法1:select min(c) from (select min(b) as c from tab_nameunionselect min(a) as c from tab_name);方法2:select least(min(A),min(B)) from table;least(...),greatest(...)中如果含有null的话,无法得到结果select greatest(max(A),max(B)) from table; 阅读全文
posted @ 2013-01-10 00:17 horizon~~~ 阅读(2794) 评论(0) 推荐(1) 编辑