摘要: Inter-type declarations Inter-type declarations in AspectJ are declarations that cut across classes and their hierarchies. They may declare members that cut across multiple classes, or change the inheritance relationship between classes. Unlike advice, which operates primarily dynamically, introduct 阅读全文
posted @ 2012-12-16 21:00 Onakaumi 阅读(182) 评论(0) 推荐(0) 编辑
摘要: ssA pointcut can be built out of other pointcuts with and, or, and not (spelled &&, ||, and !). 第一个例子..public aspect AsHelloworld { // pointcut say(): execution(* cn.*.set*(..)); pointcut setName(User u, String y): call(void User.setName(String)) && target(u) && args(y); ... 阅读全文
posted @ 2012-12-16 20:17 Onakaumi 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 最近 老师说要开发一个 crm, 我们只负责权限和界面的部分, 于是我最近一直在忙权限, 其实也很简单, 我先是了解到了 RBAC (resource-based access control..好像是这么写), 我对他的了解就是基于资源的嘛..那我就开始在数据库里面建表了.综合了网上无数人的想法, 还有我的. 我建立了 五个表...(好像有点多)..User{ int id; String name; String password; }Role{ int id; String name; }Permissio... 阅读全文
posted @ 2012-12-16 19:50 Onakaumi 阅读(179) 评论(0) 推荐(0) 编辑
摘要: The default Filter instances available automatically are defined by theDefaultFilter enumand the enum'snamefield is the name available for configuration. They are:Filter NameClassanonorg.apache.shiro.web.filter.authc.AnonymousFilterauthcorg.apache.shiro.web.filter.authc.FormAuthenticationFiltera 阅读全文
posted @ 2012-12-15 21:07 Onakaumi 阅读(192) 评论(0) 推荐(0) 编辑
摘要: @AssertTrue //用于boolean字段,该字段只能为true@AssertFalse//该字段的值只能为false@CreditCardNumber//对信用卡号进行一个大致的验证@DecimalMax//只能小于或等于该值@DecimalMin//只能大于或等于该值@Digits(integer=2,fraction=20)//检查是否是一种数字的整数、分数,小数位数的数字。@Email//检查是否是一个有效的email地址@Future//检查该字段的日期是否是属于将来的日期@Length(min=,max=)//检查所属的字段的长度是否在min和max之间,只能用于字符串@M 阅读全文
posted @ 2012-12-13 16:40 Onakaumi 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 返回值:ArrayjQuery.grep(array, callback, [invert])概述使用过滤函数过滤数组元素。此函数至少传递两个参数:待过滤数组和过滤函数。过滤函数必须返回 true 以保留元素或 false 以删除元素。参数array,callback,[invert]Array,Function,BooleanV1.0array:待过滤数组。callback:此函数将处理数组每个元素。第一个参数为当前元素,第二个参数而元素索引值。此函数应返回一个布尔值。另外,此函数可设置为一个字符串,当设置为字符串时,将视为“lambda-form”(缩写形式?),其中 a 代表数组元素,i 阅读全文
posted @ 2012-12-05 19:05 Onakaumi 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2012-12-05 15:05 Onakaumi 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 我喜欢直接上代码<!doctype html><html><head><meta charset="utf-8"><title>无标题文档</title><script type="application/javascript">/* * subscribe : 注册函数.. * * publish: 执行函数. * * 具体用法: * mediator.subsrcibe("fuName", function(...){....}) * mediat 阅读全文
posted @ 2012-11-30 11:32 Onakaumi 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 1.Prototypevar Class = { create: function() { return function() { this.init.apply(this, arguments); } }}var A = Class.create();A.prototype = { init: function(msg) { this.msg = msg; }, fn: function() { alert(this.msg); }}var a = new A("myMsg");... 阅读全文
posted @ 2012-11-29 14:51 Onakaumi 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Session s = HibernameUtil.getSession(); s.beginTransaction(); // QBC List<Customer> cs = s.createCriteria(Customer.class).add( Restrictions.like("realName", "sex", MatchMode.ANYWHERE)) .list(); // HQL List<Customer> css = s.crea... 阅读全文
posted @ 2012-11-27 16:42 Onakaumi 阅读(206) 评论(0) 推荐(0) 编辑