示例#1
0
  @Bean
  public MapperFactoryBean<StatMapper> statMapperFactory(
      @Qualifier("primarySession") SqlSessionFactory ssf) throws Exception {
    MapperFactoryBean<StatMapper> beanFactory = new MapperFactoryBean<StatMapper>();
    beanFactory.setMapperInterface(StatMapper.class);
    beanFactory.setSqlSessionFactory(ssf);

    return beanFactory;
  }
示例#2
0
  @Bean
  public MapperFactoryBean<MapperDownloadItem> downloadItemsMapperFactory(
      @Qualifier("primarySession") SqlSessionFactory ssf) throws Exception {
    MapperFactoryBean<MapperDownloadItem> beanFactory = new MapperFactoryBean<MapperDownloadItem>();
    beanFactory.setMapperInterface(MapperDownloadItem.class);
    beanFactory.setSqlSessionFactory(ssf);

    return beanFactory;
  }
  @Override
  protected void checkDaoConfig() {
    super.checkDaoConfig();

    if (pagingQueryExecutor == null) {
      PagingContext pagingContext = new PagingContext(getSqlSession().getConfiguration());
      pagingQueryExecutor =
          ExecutorRepository.getPagingQueryExecutor(getSqlSession(), pagingContext);
    }
  }