SqlSessionFactory sqlMapper_0 = new SqlSessionFactoryBuilder().build(reader_0);
SqlSessionFactory sqlMapper_1 = new SqlSessionFactoryBuilder().build(reader_1);
SqlSessionFactory sqlMapper_2 = new SqlSessionFactoryBuilder().build(reader_2);
shardConfigs.add(new ShardConfigurationImpl(0, sqlMapper_0.getConfiguration()
.getEnvironment().getDataSource(), sqlMapper_0));
shardConfigs.add(new ShardConfigurationImpl(1, sqlMapper_1.getConfiguration()
.getEnvironment().getDataSource(), sqlMapper_1));
shardConfigs.add(new ShardConfigurationImpl(2, sqlMapper_2.getConfiguration()
.getEnvironment().getDataSource(), sqlMapper_2));
factory = new ShardedSqlSessionFactoryBuilder().build(shardConfigs,
new UserShardStrategyFactory());