jfinal+druid启动报错

来源:互联网 发布:mac用什么下载软件 编辑:程序博客网 时间:2024/06/04 23:34
public void configPlugin(Plugins plugins) {PropertiesUtil pro = new PropertiesUtil("config.properties");String userName = pro.get("jdbc.username");String password = pro.get("jdbc.password");String url = pro.get("jdbc.url");final Integer INITIALSIZE = Integer.parseInt(pro.get("initialSize"));final Integer MIDIDLE = Integer.parseInt(pro.get("minIdle"));final Integer MAXACTIVEE = Integer.parseInt(pro.get("maxActivee"));DruidPlugin druidPlugin = new DruidPlugin(url,userName,password);druidPlugin.set(INITIALSIZE,MIDIDLE,MAXACTIVEE);druidPlugin.setFilters("stat,wall");plugins.add(druidPlugin);ActiveRecordPlugin activeRecordPlugin = new ActiveRecordPlugin(druidPlugin);plugins.add(activeRecordPlugin);activeRecordPlugin.addMapping("test", Test.class);}

启动报错Can not create Table object, maybe the table test is not exists.

增加对应数据库方言就好了

activeRecordPlugin.setDialect(new OracleDialect());


0 0
原创粉丝点击