jdk提供对timer的支持,timer通过线程不停的将当前时间与服务器时间比较,如时间相同,则执行相应的方法. class MyJob extends TimerTask{  public void run() {   System.out.println("哈哈哈");  } 在时间相等的情况下,执行timertask的run()方法. //设置为守护线程 Timer timer = new Timer(true); //固定时间执行 timer.schedule(new MyJob(), new Date(108,5,31) ...
 前段时间在做模糊查询,并利用数据库分页,DAO用hibernate实现,刚开始的时候 根据业务层的数据,拼hql语句进行查询,且不说要进行一些if判断,单从结构上来说, 底层的数据访问层依赖于业务层或者表现层了.   比如说,我想查询姓王的员工,年龄大于30岁的,在DAO显然要name like '%王' and age >30,如果业务发生变化,查询与王**姓名相同,年龄等于30的,那就改hql语句吧, name ='王**' and age =30,数据访问层依赖于业务层,觉得不合理.  Hibernate3提供一个新的东西,DetachedCr ...
 AuthenticationPostUpdateListenerEvent code: /**  * @author 叶天兵  */ @SuppressWarnings("serial") public class AuthenticationPostUpdateListenerEvent implements   PostUpdateEventListener {  private UpdateAcegiCache updateAcegiCache;  /**   * @param updateAce ...
 资源信息:  code: public Resource(String authResource, int resType, GrantedAuthority[] authorities) {   // TODO 自动生成构造函数存根   if(authResource == null ||"".equals(authResource)){    throw new IllegalArgumentException("can't put null or empty value to resou ...
DBFilterInvocationDefinationSource 实现AbstractFilterInvocationDefinitionSource ,从db获取资源信息 code: public class DBFilterInvocationDefinationSource extends   AbstractFilterInvocationDefinitionSource {  private boolean convertUrlToLowercaseBeforeComparison = false;    private ...
 现在设置认证管理器 <!-- * set authenticationManager , an important manager-->  <bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">   <property name="providers">    <list>     <ref bean="d ...
    第一次写blog,由于文笔差,请大家见谅.     最近通过springside和springframework社区学习acegi,并将其加入到我的设计之中.,现在做到web-request,method interceptor,至于domain object级别和acl也没有去研究,但感觉做到这两步也就差不多了吧..    jar包:     spring1.2.jar        acegi-security-1 ...
heaven.robin
搜索本博客
最新评论
评论排行榜