jfinal+druid啓動報錯

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());


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章