use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class MultipleCrossIncludeTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(MultipleCrossIncludePersonMapper.class);
configuration.addMapper(MultipleCrossIncludePetMapper.class);
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration);
initDb(sqlSessionFactory);
return sqlSessionFactory;
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class MultipleIncludeTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(MultipleIncludePersonMapper.class);
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration);
initDb(sqlSessionFactory);
return sqlSessionFactory;
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class MultipleReverseIncludeTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(MultipleReverseIncludePersonMapper.class);
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration);
initDb(sqlSessionFactory);
return sqlSessionFactory;
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class SubstitutionInAnnotsTest method setUp.
@BeforeAll
static void setUp() throws Exception {
Configuration configuration = new Configuration();
Environment environment = new Environment("test", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:annots", null));
configuration.setEnvironment(environment);
configuration.addMapper(SubstitutionInAnnotsMapper.class);
sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration);
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(), "org/apache/ibatis/submitted/substitution_in_annots/CreateDB.sql");
}
use of org.apache.ibatis.datasource.unpooled.UnpooledDataSource in project mybatis-3 by mybatis.
the class ParameterMapReferenceTest method getSqlSessionFactoryJavaConfig.
private SqlSessionFactory getSqlSessionFactoryJavaConfig() throws Exception {
Configuration configuration = new Configuration();
Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
configuration.setEnvironment(environment);
configuration.addMapper(ParameterMapReferencePersonMapper.class);
configuration.addMapper(ParameterMapReferencePetMapper.class);
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration);
initDb(sqlSessionFactory);
return sqlSessionFactory;
}
Aggregations