Search in sources :

Example 1 with SqlSessionFactoryBean

use of org.mybatis.spring.SqlSessionFactoryBean in project Settler by EmhyrVarEmreis.

the class MainSource method sqlSessionFactorySettlerBean.

@Bean(name = "sqlSession-settler")
public SqlSessionFactory sqlSessionFactorySettlerBean(@Qualifier("dataSource-settler") DataSource dataSource) throws Exception {
    SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
    bean.setDataSource(dataSource);
    return bean.getObject();
}
Also used : SqlSessionFactoryBean(org.mybatis.spring.SqlSessionFactoryBean) SqlSessionFactoryBean(org.mybatis.spring.SqlSessionFactoryBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

SqlSessionFactoryBean (org.mybatis.spring.SqlSessionFactoryBean)1 Bean (org.springframework.context.annotation.Bean)1