Java tutorial
/** * Copyright (c) 2012-2014 http://www.eryansky.com * * Licensed under the Apache License, Version 2.0 (the "License"); */ package com.eryansky.common.orm.mybatis.proxy; import org.apache.ibatis.binding.MapperRegistry; import org.apache.ibatis.session.Configuration; import org.apache.ibatis.session.SqlSession; /** * <p> * Mybatis?. * </p> * * @author &Eryan eryanwcp@gmail.com * @version 2014-7-16 */ public class PageConfiguration extends Configuration { protected MapperRegistry mapperRegistry = new PaginationMapperRegistry(this); @Override public <T> void addMapper(Class<T> type) { mapperRegistry.addMapper(type); } @Override public <T> T getMapper(Class<T> type, SqlSession sqlSession) { return mapperRegistry.getMapper(type, sqlSession); } @Override public boolean hasMapper(Class<?> type) { return mapperRegistry.hasMapper(type); } }