Package com.jfinal.plugin.activerecord

Examples of com.jfinal.plugin.activerecord.ActiveRecordPlugin.addMapping()


    me.add(c3p0Plugin);
   
    // 配置ActiveRecord插件
    ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);
    me.add(arp);
    arp.addMapping("blog", Blog.class)// 映射blog 表到 Blog模型
  }
 
  /**
   * 配置全局拦截器
   */
 
View Full Code Here


        ds.setUrl(jdbcUrl);     ds.setUser(user);       ds.setPassword(password);
        ActiveRecordPlugin arp = new ActiveRecordPlugin(ds);
        if (isLocal) {
            arp.setShowSql(true);
        }
        arp.addMapping("module", Module.class).addMapping("topic", Topic.class).addMapping("post", Post.class);
        arp.addMapping("reply", Reply.class).addMapping("user", User.class);
        me.add(arp);
        me.add(new EhCachePlugin());
    }
View Full Code Here

        ActiveRecordPlugin arp = new ActiveRecordPlugin(ds);
        if (isLocal) {
            arp.setShowSql(true);
        }
        arp.addMapping("module", Module.class).addMapping("topic", Topic.class).addMapping("post", Post.class);
        arp.addMapping("reply", Reply.class).addMapping("user", User.class);
        me.add(arp);
        me.add(new EhCachePlugin());
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.