1
回答
我这样配置对不对?请求帮助
终于搞明白,存储TCO原来是这样算的>>>   

/**
  * 配置插件
  */
 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);
  arp.addMapping("hyd_loan", HydLoan.class);

我不知道这是不是版本升级的问题造成的呀

举报
顶部