public void configPlugin(Plugins plugins) {
//Jfinal配置插件
//输入库连接池
//C3p0Plugin c3p0Plugin = new C3p0Plugin(getProperty("jdbcUrl"), getProperty("user"), getProperty("password"));
C3p0Plugin c3p0Plugin = new C3p0Plugin(PropKit.get("jdbcUrl"), PropKit.get("user"), PropKit.get("password"));
//ORM Activerecord
ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);
arp.setShowSql(true);
arp.addMapping("user", UserModel.class);
arp.addMapping("log", Log.class); //参数1为数据库表名并严格区分大小写
plugins.add(c3p0Plugin);
plugins.add(arp);
//自定义插件
MyPlugin myPlugin=new MyPlugin();
plugins.
04 JFinal configPlugin 插件配置
最新推荐文章于 2022-06-01 14:51:08 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)