use of com.baomidou.mybatisplus.core.MybatisSqlSessionFactoryBuilder in project mybatis-plus-samples by baomidou.
the class NoSpring method initSqlSessionFactory.
public static SqlSessionFactory initSqlSessionFactory() {
DataSource dataSource = dataSource();
TransactionFactory transactionFactory = new JdbcTransactionFactory();
Environment environment = new Environment("Production", transactionFactory, dataSource);
MybatisConfiguration configuration = new MybatisConfiguration(environment);
configuration.addMapper(PersonMapper.class);
configuration.setLogImpl(StdOutImpl.class);
return new MybatisSqlSessionFactoryBuilder().build(configuration);
}
Aggregations