首页 新闻 会员 周边

Spring Boot集成MyBatis与分页插件

0
[待解决问题]

系统环境:
SpringBoot(配置方式全部采用javaBean)
MyBatis
数据库:Oracle
以下是sqlSessionFactory的配置

 

@Bean(name = "sqlSessionFactory")
    @Primary
    public SqlSessionFactoryBean sqlSessionFactory(
            @Qualifier("dataSource") DataSource ds) {
        SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
        bean.setDataSource(ds);
        bean.setTypeAliasesPackage("com.ai.purchase");
        ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
        try {
            bean.setMapperLocations(resolver
                    .getResources("classpath:mybatis/mapper/*.xml"));
        } catch (IOException e) {
            LOG.error("failed to initialize sql Session Factory");
        }
        return bean;
    }

我想在现在的配置中增加mybatis的分页插件,经过一些尝试没有成功。
由于使用的javaBean的配置个人不太熟练,然后在开源的插件配置上都是xml的配置,哪位同学有经验请指教。
以下是我的一些参考资料

参考资料:
https://github.com/abel533/MyBatis-Spring-Boot
http://blog.csdn.net/isea533/article/details/50359390
http://blog.csdn.net/goldenfish1919/article/details/51706316

newbie94的主页 newbie94 | 菜鸟二级 | 园豆:202
提问于:2017-08-29 12:06
< >
分享
所有回答(1)
0

springboot做好还是和Springdata 集成,开发轻量快捷

皮五天 | 园豆:204 (菜鸟二级) | 2017-11-06 21:28
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册