类 MybatisConfiguration
java.lang.Object
org.apache.ibatis.session.Configuration
com.baomidou.mybatisplus.core.MybatisConfiguration
public class MybatisConfiguration
extends org.apache.ibatis.session.Configuration
replace default Configuration class
Caratacus 2016/9/25 replace mapperRegistry
- 从以下版本开始:
- 2016-01-23
- 作者:
- hubin
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected classMybatisConfiguration.StrictMap<V> -
字段概要
字段 修饰符和类型 字段 说明 protected Map<String,org.apache.ibatis.cache.Cache>cachesprotected Map<String,org.apache.ibatis.executor.keygen.KeyGenerator>keyGeneratorsprotected Map<String,org.apache.ibatis.mapping.MappedStatement>mappedStatementsprotected MybatisMapperRegistrymybatisMapperRegistryMapper 注册protected Map<String,org.apache.ibatis.mapping.ParameterMap>parameterMapsprotected Map<String,org.apache.ibatis.mapping.ResultMap>resultMapsprotected Map<String,org.apache.ibatis.parsing.XNode>sqlFragments从类继承的字段 org.apache.ibatis.session.Configuration
aggressiveLazyLoading, autoMappingBehavior, autoMappingUnknownColumnBehavior, cacheEnabled, cacheRefMap, callSettersOnNulls, configurationFactory, databaseId, defaultExecutorType, defaultFetchSize, defaultResultSetType, defaultSqlProviderType, defaultStatementTimeout, environment, incompleteCacheRefs, incompleteMethods, incompleteResultMaps, incompleteStatements, interceptorChain, jdbcTypeForNull, languageRegistry, lazyLoadingEnabled, lazyLoadTriggerMethods, loadedResources, localCacheScope, logImpl, logPrefix, mapperRegistry, mapUnderscoreToCamelCase, multipleResultSetsEnabled, objectFactory, objectWrapperFactory, proxyFactory, reflectorFactory, returnInstanceForEmptyRow, safeResultHandlerEnabled, safeRowBoundsEnabled, shrinkWhitespacesInSql, typeAliasRegistry, typeHandlerRegistry, useActualParamName, useColumnLabel, useGeneratedKeys, variables, vfsImpl -
构造器概要
构造器 构造器 说明 MybatisConfiguration()初始化调用MybatisConfiguration(org.apache.ibatis.mapping.Environment environment) -
方法概要
修饰符和类型 方法 说明 voidaddCache(org.apache.ibatis.cache.Cache cache)voidaddKeyGenerator(String id, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator)voidaddMappedStatement(org.apache.ibatis.mapping.MappedStatement ms)MybatisPlus 加载 SQL 顺序:<T> voidaddMapper(Class<T> type)使用自己的 MybatisMapperRegistryvoidaddMappers(String packageName)使用自己的 MybatisMapperRegistryvoidaddMappers(String packageName, Class<?> superType)使用自己的 MybatisMapperRegistryvoidaddParameterMap(org.apache.ibatis.mapping.ParameterMap pm)voidaddResultMap(org.apache.ibatis.mapping.ResultMap rm)protected voidcheckGloballyForDiscriminatedNestedResultMaps(org.apache.ibatis.mapping.ResultMap rm)protected voidcheckLocallyForDiscriminatedNestedResultMaps(org.apache.ibatis.mapping.ResultMap rm)org.apache.ibatis.cache.CachegetCache(String id)Collection<String>getCacheNames()Collection<org.apache.ibatis.cache.Cache>getCaches()GlobalConfiggetGlobalConfig()已过时。org.apache.ibatis.executor.keygen.KeyGeneratorgetKeyGenerator(String id)Collection<String>getKeyGeneratorNames()Collection<org.apache.ibatis.executor.keygen.KeyGenerator>getKeyGenerators()org.apache.ibatis.mapping.MappedStatementgetMappedStatement(String id)org.apache.ibatis.mapping.MappedStatementgetMappedStatement(String id, boolean validateIncompleteStatements)Collection<String>getMappedStatementNames()Collection<org.apache.ibatis.mapping.MappedStatement>getMappedStatements()<T> TgetMapper(Class<T> type, org.apache.ibatis.session.SqlSession sqlSession)使用自己的 MybatisMapperRegistryorg.apache.ibatis.binding.MapperRegistrygetMapperRegistry()使用自己的 MybatisMapperRegistryorg.apache.ibatis.mapping.ParameterMapgetParameterMap(String id)Collection<String>getParameterMapNames()Collection<org.apache.ibatis.mapping.ParameterMap>getParameterMaps()org.apache.ibatis.mapping.ResultMapgetResultMap(String id)Collection<String>getResultMapNames()Collection<org.apache.ibatis.mapping.ResultMap>getResultMaps()Map<String,org.apache.ibatis.parsing.XNode>getSqlFragments()booleanhasCache(String id)booleanhasKeyGenerator(String id)booleanhasMapper(Class<?> type)使用自己的 MybatisMapperRegistrybooleanhasParameterMap(String id)booleanhasResultMap(String id)booleanhasStatement(String statementName, boolean validateIncompleteStatements)booleanisUseDeprecatedExecutor()已过时。该属性将会随着 com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor 插件的移除而移除booleanisUseGeneratedShortKey()是否生成短key缓存org.apache.ibatis.executor.ExecutornewExecutor(org.apache.ibatis.transaction.Transaction transaction, org.apache.ibatis.session.ExecutorType executorType)voidsetDefaultScriptingLanguage(Class<? extends org.apache.ibatis.scripting.LanguageDriver> driver)指定动态SQL生成的默认语言voidsetGlobalConfig(GlobalConfig globalConfig)已过时。3.4.0 please useGlobalConfigUtils.setGlobalConfig(Configuration, GlobalConfig)voidsetUseDeprecatedExecutor(boolean useDeprecatedExecutor)已过时。该属性将会随着 com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor 插件的移除而移除voidsetUseGeneratedShortKey(boolean useGeneratedShortKey)是否生成短key缓存从类继承的方法 org.apache.ibatis.session.Configuration
addCacheRef, addIncompleteCacheRef, addIncompleteMethod, addIncompleteResultMap, addIncompleteStatement, addInterceptor, addLoadedResource, buildAllStatements, extractNamespace, getAutoMappingBehavior, getAutoMappingUnknownColumnBehavior, getConfigurationFactory, getDatabaseId, getDefaultExecutorType, getDefaultFetchSize, getDefaultResultSetType, getDefaultScriptingLanguageInstance, getDefaultScriptingLanuageInstance, getDefaultSqlProviderType, getDefaultStatementTimeout, getEnvironment, getIncompleteCacheRefs, getIncompleteMethods, getIncompleteResultMaps, getIncompleteStatements, getInterceptors, getJdbcTypeForNull, getLanguageDriver, getLanguageRegistry, getLazyLoadTriggerMethods, getLocalCacheScope, getLogImpl, getLogPrefix, getObjectFactory, getObjectWrapperFactory, getProxyFactory, getReflectorFactory, getTypeAliasRegistry, getTypeHandlerRegistry, getVariables, getVfsImpl, hasStatement, isAggressiveLazyLoading, isCacheEnabled, isCallSettersOnNulls, isLazyLoadingEnabled, isMapUnderscoreToCamelCase, isMultipleResultSetsEnabled, isResourceLoaded, isReturnInstanceForEmptyRow, isSafeResultHandlerEnabled, isSafeRowBoundsEnabled, isShrinkWhitespacesInSql, isUseActualParamName, isUseColumnLabel, isUseGeneratedKeys, newExecutor, newMetaObject, newParameterHandler, newResultSetHandler, newStatementHandler, setAggressiveLazyLoading, setAutoMappingBehavior, setAutoMappingUnknownColumnBehavior, setCacheEnabled, setCallSettersOnNulls, setConfigurationFactory, setDatabaseId, setDefaultEnumTypeHandler, setDefaultExecutorType, setDefaultFetchSize, setDefaultResultSetType, setDefaultSqlProviderType, setDefaultStatementTimeout, setEnvironment, setJdbcTypeForNull, setLazyLoadingEnabled, setLazyLoadTriggerMethods, setLocalCacheScope, setLogImpl, setLogPrefix, setMapUnderscoreToCamelCase, setMultipleResultSetsEnabled, setObjectFactory, setObjectWrapperFactory, setProxyFactory, setReflectorFactory, setReturnInstanceForEmptyRow, setSafeResultHandlerEnabled, setSafeRowBoundsEnabled, setShrinkWhitespacesInSql, setUseActualParamName, setUseColumnLabel, setUseGeneratedKeys, setVariables, setVfsImpl
-
字段详细资料
-
mybatisMapperRegistry
Mapper 注册 -
caches
-
resultMaps
-
parameterMaps
-
keyGenerators
-
sqlFragments
-
mappedStatements
-
-
构造器详细资料
-
MybatisConfiguration
public MybatisConfiguration(org.apache.ibatis.mapping.Environment environment) -
MybatisConfiguration
public MybatisConfiguration()初始化调用
-
-
方法详细资料
-
getGlobalConfig
已过时。3.4.0 please useGlobalConfigUtils.getGlobalConfig(Configuration)- 返回:
- GlobalConfig
-
setGlobalConfig
已过时。3.4.0 please useGlobalConfigUtils.setGlobalConfig(Configuration, GlobalConfig)- 参数:
globalConfig- GlobalConfig
-
addMappedStatement
public void addMappedStatement(org.apache.ibatis.mapping.MappedStatement ms)MybatisPlus 加载 SQL 顺序:1、加载 XML中的 SQL
2、加载 SqlProvider 中的 SQL
3、XmlSql 与 SqlProvider不能包含相同的 SQL
调整后的 SQL优先级:XmlSql > sqlProvider > CurdSql
- 覆盖:
addMappedStatement在类中org.apache.ibatis.session.Configuration
-
getMapperRegistry
public org.apache.ibatis.binding.MapperRegistry getMapperRegistry()使用自己的 MybatisMapperRegistry- 覆盖:
getMapperRegistry在类中org.apache.ibatis.session.Configuration
-
addMapper
使用自己的 MybatisMapperRegistry- 覆盖:
addMapper在类中org.apache.ibatis.session.Configuration
-
addMappers
使用自己的 MybatisMapperRegistry- 覆盖:
addMappers在类中org.apache.ibatis.session.Configuration
-
addMappers
使用自己的 MybatisMapperRegistry- 覆盖:
addMappers在类中org.apache.ibatis.session.Configuration
-
getMapper
使用自己的 MybatisMapperRegistry- 覆盖:
getMapper在类中org.apache.ibatis.session.Configuration
-
hasMapper
使用自己的 MybatisMapperRegistry- 覆盖:
hasMapper在类中org.apache.ibatis.session.Configuration
-
setDefaultScriptingLanguage
public void setDefaultScriptingLanguage(Class<? extends org.apache.ibatis.scripting.LanguageDriver> driver)指定动态SQL生成的默认语言- 覆盖:
setDefaultScriptingLanguage在类中org.apache.ibatis.session.Configuration- 参数:
driver- LanguageDriver
-
addKeyGenerator
public void addKeyGenerator(String id, org.apache.ibatis.executor.keygen.KeyGenerator keyGenerator)- 覆盖:
addKeyGenerator在类中org.apache.ibatis.session.Configuration
-
getKeyGeneratorNames
- 覆盖:
getKeyGeneratorNames在类中org.apache.ibatis.session.Configuration
-
getKeyGenerators
- 覆盖:
getKeyGenerators在类中org.apache.ibatis.session.Configuration
-
getKeyGenerator
- 覆盖:
getKeyGenerator在类中org.apache.ibatis.session.Configuration
-
hasKeyGenerator
- 覆盖:
hasKeyGenerator在类中org.apache.ibatis.session.Configuration
-
addCache
public void addCache(org.apache.ibatis.cache.Cache cache)- 覆盖:
addCache在类中org.apache.ibatis.session.Configuration
-
getCacheNames
- 覆盖:
getCacheNames在类中org.apache.ibatis.session.Configuration
-
getCaches
- 覆盖:
getCaches在类中org.apache.ibatis.session.Configuration
-
getCache
- 覆盖:
getCache在类中org.apache.ibatis.session.Configuration
-
hasCache
- 覆盖:
hasCache在类中org.apache.ibatis.session.Configuration
-
addResultMap
public void addResultMap(org.apache.ibatis.mapping.ResultMap rm)- 覆盖:
addResultMap在类中org.apache.ibatis.session.Configuration
-
getResultMapNames
- 覆盖:
getResultMapNames在类中org.apache.ibatis.session.Configuration
-
getResultMaps
- 覆盖:
getResultMaps在类中org.apache.ibatis.session.Configuration
-
getResultMap
- 覆盖:
getResultMap在类中org.apache.ibatis.session.Configuration
-
hasResultMap
- 覆盖:
hasResultMap在类中org.apache.ibatis.session.Configuration
-
addParameterMap
public void addParameterMap(org.apache.ibatis.mapping.ParameterMap pm)- 覆盖:
addParameterMap在类中org.apache.ibatis.session.Configuration
-
getParameterMapNames
- 覆盖:
getParameterMapNames在类中org.apache.ibatis.session.Configuration
-
getParameterMaps
- 覆盖:
getParameterMaps在类中org.apache.ibatis.session.Configuration
-
getParameterMap
- 覆盖:
getParameterMap在类中org.apache.ibatis.session.Configuration
-
hasParameterMap
- 覆盖:
hasParameterMap在类中org.apache.ibatis.session.Configuration
-
getSqlFragments
- 覆盖:
getSqlFragments在类中org.apache.ibatis.session.Configuration
-
getMappedStatementNames
- 覆盖:
getMappedStatementNames在类中org.apache.ibatis.session.Configuration
-
getMappedStatements
- 覆盖:
getMappedStatements在类中org.apache.ibatis.session.Configuration
-
getMappedStatement
- 覆盖:
getMappedStatement在类中org.apache.ibatis.session.Configuration
-
getMappedStatement
public org.apache.ibatis.mapping.MappedStatement getMappedStatement(String id, boolean validateIncompleteStatements)- 覆盖:
getMappedStatement在类中org.apache.ibatis.session.Configuration
-
hasStatement
- 覆盖:
hasStatement在类中org.apache.ibatis.session.Configuration
-
newExecutor
public org.apache.ibatis.executor.Executor newExecutor(org.apache.ibatis.transaction.Transaction transaction, org.apache.ibatis.session.ExecutorType executorType)- 覆盖:
newExecutor在类中org.apache.ibatis.session.Configuration
-
checkGloballyForDiscriminatedNestedResultMaps
protected void checkGloballyForDiscriminatedNestedResultMaps(org.apache.ibatis.mapping.ResultMap rm)- 覆盖:
checkGloballyForDiscriminatedNestedResultMaps在类中org.apache.ibatis.session.Configuration
-
checkLocallyForDiscriminatedNestedResultMaps
protected void checkLocallyForDiscriminatedNestedResultMaps(org.apache.ibatis.mapping.ResultMap rm)- 覆盖:
checkLocallyForDiscriminatedNestedResultMaps在类中org.apache.ibatis.session.Configuration
-
setUseGeneratedShortKey
public void setUseGeneratedShortKey(boolean useGeneratedShortKey)是否生成短key缓存- 从以下版本开始:
- 3.4.0
-
isUseGeneratedShortKey
public boolean isUseGeneratedShortKey()是否生成短key缓存- 从以下版本开始:
- 3.4.0
-
setUseDeprecatedExecutor
已过时。该属性将会随着 com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor 插件的移除而移除 -
isUseDeprecatedExecutor
已过时。该属性将会随着 com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor 插件的移除而移除
-
GlobalConfigUtils.getGlobalConfig(Configuration)