请问在单独使用DaoUp.me().init()的时候,如何配置读写分离
8 回复
配不来的, 用代码来配
public static DaoUp masterDaoUp;
public static DaoUp slaveDaoUp;
public voic init () {
masterDaoUp = DaoUp.me()
masterDaoUp.init("db.properties");
slaveDaoUp = new DaoUp("slave"){};
slaveDaoUp.init("db-slave.properties");
NutDao dao = (NutDao)masterDaoUp.dao();
NutDaoRunner runner = new NutDaoRunner();
runner.setDataSource(slaveDaoUp.getDataSource);
dao.setRunner(runner);
@wendal 你好,再请教一个问题
我现在配置是最简单的
url=jdbc:mysql://10.2.2.1/tesbdb
username=sa
password=123123
请问如何配置连接池和连接池大小呢
添加回复
请先登陆