JFinal中Config的c3p0连接池语句

C3p0Plugin c3p0Plugin = new C3p0Plugin("jdbc:mysql://121.42.29.124:3306/firestation?useUnicode=true&characterEncoding=utf-8", "root", "123");  
//【("jdbc:mysql://数据库地址:3306/数据库名称?useUnicode=true&characterEncoding=utf-8", "root", "密码")】
me.add(c3p0Plugin);//配置数据库操作插件

ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);

me.add(arp);  //配置数据库表与实体的映射
arp.addMapping("bse_user", "id",User.class);
//【arp.addMapping("数据库中的表单名称", "id",Mode类)】

你可能感兴趣的:(JFinal中Config的c3p0连接池语句)