/**
* 配置插件
*/
public void configPlugin(Plugins me) {
DruidPlugin druidPlugin = new DruidPlugin(getProperty("jdbcUrl"),
getProperty("user"),
getProperty("password"),
getProperty("driverClass"));
druidPlugin.setInitialSize(getPropertyToInt("initialSize"));
druidPlugin.setMinIdle(getPropertyToInt("minIdle"));
druidPlugin.setMaxActive(getPropertyToInt("maxActive"));
druidPlugin.setMaxWait(getPropertyToInt("maxWait"));
druidPlugin.setMinEvictableIdleTimeMillis(getPropertyToInt("minEvictableIdleTimeMillis"));
druidPlugin.setTimeBetweenEvictionRunsMillis(getPropertyToInt("timeBetweenEvictionRunsMillis"));
druidPlugin.setValidationQuery(getProperty("validationQuery"));
druidPlugin.setTestWhileIdle(getPropertyToBoolean("testWhileIdle"));
druidPlugin.setTestOnBorrow(getPropertyToBoolean("testOnBorrow"));
druidPlugin.setTestOnReturn(getPropertyToBoolean("testOnReturn"));
druidPlugin.setMaxPoolPreparedStatementPerConnectionSize(getPropertyToInt("maxPoolPreparedStatementPerConnectionSize"));
druidPlugin.setFilters(getProperty("filters"));
me.add(druidPlugin);
AutoTableBindPlugin atbp = new AutoTableBindPlugin(druidPlugin,SimpleNameStyles.LOWER_UNDERLINE);
me.add(atbp);
ActiveRecordPlugin arp = new ActiveRecordPlugin("otherConfig",druidPlugin);
// 配置ActiveRecord插件
arp.setDialect(new MysqlDialect());
arp.setContainerFactory(new CaseInsensitiveContainerFactory());
arp.setShowSql(true);
me.add(arp);
}
没有升级版本之前(jfinal1.1.5),我可以做新增,修改,删除,查询操作
可是升级版本后,目前来看update方法不行了,必须,增加如下方法
arp.addMapping("hyd_loan_advice", HydLoanAdvice.class);我不知道这是不是版本升级的问题造成的呀
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。