public class MapperFactoryBean<T>
extends org.mybatis.spring.support.SqlSessionDaoSupport
implements org.springframework.beans.factory.FactoryBean<T>
| Constructor and Description |
|---|
MapperFactoryBean() |
MapperFactoryBean(Class<T> mapperInterface) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkDaoConfig() |
Class<T> |
getMapperInterface()
返回MyBatis mapper的mapper接口
|
T |
getObject() |
Class<T> |
getObjectType() |
boolean |
isAddToConfig()
将添加的标志返回到MyBatis配置中。
如果映射器将被添加到MyBatis,则返回true,
如果它还没有被添加到MyBatis中注册。
|
boolean |
isSingleton() |
void |
setAddToConfig(boolean addToConfig)
如果addToConfig为false,映射器将不会添加到MyBatis。这意味着
它必须包含在mybatisconfig .xml中
如果是真的,映射器将被添加到MyBatis中,如果还没有
注册。默认情况下addToCofig为真。
|
void |
setMapperBuilder(MapperBuilder mapperBuilder)
设置通用 Mapper 配置
|
void |
setMapperInterface(Class<T> mapperInterface)
设置MyBatis mapper的mapper接口
|
protected void checkDaoConfig()
checkDaoConfig in class org.mybatis.spring.support.SqlSessionDaoSupportpublic T getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<T>public Class<T> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<T>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<T>public Class<T> getMapperInterface()
public void setMapperInterface(Class<T> mapperInterface)
mapperInterface - 接口public boolean isAddToConfig()
public void setAddToConfig(boolean addToConfig)
addToConfig - 是否添加public void setMapperBuilder(MapperBuilder mapperBuilder)
mapperBuilder - 绑定器Copyright © 2019. All rights reserved.