类 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
-
嵌套类概要
嵌套类 -
字段概要
字段从类继承的字段 org.apache.ibatis.session.Configuration
aggressiveLazyLoading, argNameBasedConstructorAutoMapping, 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, nullableOnForEach, objectFactory, objectWrapperFactory, proxyFactory, reflectorFactory, returnInstanceForEmptyRow, safeResultHandlerEnabled, safeRowBoundsEnabled, shrinkWhitespacesInSql, typeAliasRegistry, typeHandlerRegistry, useActualParamName, useColumnLabel, useGeneratedKeys, variables, vfsImpl -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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> void使用自己的 MybatisMapperRegistryvoidaddMappers(String packageName) 使用自己的 MybatisMapperRegistryvoidaddMappers(String packageName, Class<?> superType) 使用自己的 MybatisMapperRegistry<T> voidaddNewMapper(Class<T> type) 已过时。3.5.8 不建议在实际生产环境中使用.voidaddParameterMap(org.apache.ibatis.mapping.ParameterMap pm) voidaddResultMap(org.apache.ibatis.mapping.ResultMap rm) voidcheckGloballyForDiscriminatedNestedResultMaps(org.apache.ibatis.mapping.ResultMap rm) protected voidcheckLocallyForDiscriminatedNestedResultMaps(org.apache.ibatis.mapping.ResultMap rm) org.apache.ibatis.cache.CacheCollection<org.apache.ibatis.cache.Cache> org.apache.ibatis.executor.keygen.KeyGeneratorCollection<org.apache.ibatis.executor.keygen.KeyGenerator> org.apache.ibatis.mapping.MappedStatementorg.apache.ibatis.mapping.MappedStatementgetMappedStatement(String id, boolean validateIncompleteStatements) Collection<org.apache.ibatis.mapping.MappedStatement> <T> T使用自己的 MybatisMapperRegistryorg.apache.ibatis.binding.MapperRegistry使用自己的 MybatisMapperRegistryorg.apache.ibatis.mapping.ParameterMapCollection<org.apache.ibatis.mapping.ParameterMap> org.apache.ibatis.mapping.ResultMapgetResultMap(String id) Collection<org.apache.ibatis.mapping.ResultMap> booleanbooleanboolean使用自己的 MybatisMapperRegistrybooleanbooleanhasResultMap(String id) booleanhasStatement(String statementName, boolean validateIncompleteStatements) boolean是否生成短key缓存org.apache.ibatis.executor.ExecutornewExecutor(org.apache.ibatis.transaction.Transaction transaction, org.apache.ibatis.session.ExecutorType executorType) <T> voidremoveMapper(Class<T> type) 已过时。3.5.8 不建议在实际生产环境中使用.voidsetDefaultEnumTypeHandler(Class<? extends org.apache.ibatis.type.TypeHandler> typeHandler) voidsetDefaultScriptingLanguage(Class<? extends org.apache.ibatis.scripting.LanguageDriver> driver) 指定动态SQL生成的默认语言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, isArgNameBasedConstructorAutoMapping, isCacheEnabled, isCallSettersOnNulls, isLazyLoadingEnabled, isMapUnderscoreToCamelCase, isMultipleResultSetsEnabled, isNullableOnForEach, isResourceLoaded, isReturnInstanceForEmptyRow, isSafeResultHandlerEnabled, isSafeRowBoundsEnabled, isShrinkWhitespacesInSql, isUseActualParamName, isUseColumnLabel, isUseGeneratedKeys, newExecutor, newMetaObject, newParameterHandler, newResultSetHandler, newStatementHandler, parsePendingCacheRefs, parsePendingMethods, parsePendingResultMaps, parsePendingStatements, setAggressiveLazyLoading, setArgNameBasedConstructorAutoMapping, setAutoMappingBehavior, setAutoMappingUnknownColumnBehavior, setCacheEnabled, setCallSettersOnNulls, setConfigurationFactory, setDatabaseId, setDefaultExecutorType, setDefaultFetchSize, setDefaultResultSetType, setDefaultSqlProviderType, setDefaultStatementTimeout, setEnvironment, setJdbcTypeForNull, setLazyLoadingEnabled, setLazyLoadTriggerMethods, setLocalCacheScope, setLogImpl, setLogPrefix, setMapUnderscoreToCamelCase, setMultipleResultSetsEnabled, setNullableOnForEach, 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()初始化调用
-
-
方法详细资料
-
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
-
addNewMapper
已过时。3.5.8 不建议在实际生产环境中使用.新增注入新的 Mapper 信息,新增前会清理之前的缓存信息- 参数:
type- Mapper Type
-
removeMapper
已过时。3.5.8 不建议在实际生产环境中使用.移除 Mapper 相关缓存,支持 GroovyClassLoader 动态注入 Mapper- 参数:
type- Mapper Type
-
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
-
setDefaultEnumTypeHandler
public void setDefaultEnumTypeHandler(Class<? extends org.apache.ibatis.type.TypeHandler> typeHandler) - 覆盖:
setDefaultEnumTypeHandler在类中org.apache.ibatis.session.Configuration
-
addKeyGenerator
- 覆盖:
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
public 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
-