程序包 top.lingkang.mm
类 MagicConfiguration
java.lang.Object
org.apache.ibatis.session.Configuration
top.lingkang.mm.MagicConfiguration
public class MagicConfiguration
extends org.apache.ibatis.session.Configuration
mybatis-magic 主体配置,spring体系中不使用此配置
- 作者:
- lingkang Created by 2024/3/3
-
嵌套类概要
从类继承的嵌套类/接口 org.apache.ibatis.session.Configuration
org.apache.ibatis.session.Configuration.StrictMap<V extends Object> -
字段概要
字段修饰符和类型字段说明static IdGenerate默认id生成算法,至少要保持 id 列长度为 16 位字符 或使用 bigint(16) 以上
默认id算法:DefaultIdGenerate从类继承的字段 org.apache.ibatis.session.Configuration
aggressiveLazyLoading, argNameBasedConstructorAutoMapping, autoMappingBehavior, autoMappingUnknownColumnBehavior, cacheEnabled, cacheRefMap, caches, callSettersOnNulls, configurationFactory, databaseId, defaultExecutorType, defaultFetchSize, defaultResultSetType, defaultSqlProviderType, defaultStatementTimeout, environment, incompleteCacheRefs, incompleteMethods, incompleteResultMaps, incompleteStatements, interceptorChain, jdbcTypeForNull, keyGenerators, languageRegistry, lazyLoadingEnabled, lazyLoadTriggerMethods, loadedResources, localCacheScope, logImpl, logPrefix, mappedStatements, mapperRegistry, mapUnderscoreToCamelCase, multipleResultSetsEnabled, nullableOnForEach, objectFactory, objectWrapperFactory, parameterMaps, proxyFactory, reflectorFactory, resultMaps, returnInstanceForEmptyRow, safeResultHandlerEnabled, safeRowBoundsEnabled, shrinkWhitespacesInSql, sqlFragments, typeAliasRegistry, typeHandlerRegistry, useActualParamName, useColumnLabel, useGeneratedKeys, variables, vfsImpl -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addMapperXml(String... mapperXml) 添加 mapper xml映射文件。org.apache.ibatis.session.SqlSessionFactorybuild()setDataSource(DataSource dataSource) setIdGenerate(IdGenerate idGenerate) 从类继承的方法 org.apache.ibatis.session.Configuration
addCache, addCacheRef, addIncompleteCacheRef, addIncompleteMethod, addIncompleteResultMap, addIncompleteStatement, addInterceptor, addKeyGenerator, addLoadedResource, addMappedStatement, addMapper, addMappers, addMappers, addParameterMap, addResultMap, buildAllStatements, checkGloballyForDiscriminatedNestedResultMaps, checkLocallyForDiscriminatedNestedResultMaps, extractNamespace, getAutoMappingBehavior, getAutoMappingUnknownColumnBehavior, getCache, getCacheNames, getCaches, getConfigurationFactory, getDatabaseId, getDefaultExecutorType, getDefaultFetchSize, getDefaultResultSetType, getDefaultScriptingLanguageInstance, getDefaultScriptingLanuageInstance, getDefaultSqlProviderType, getDefaultStatementTimeout, getEnvironment, getIncompleteCacheRefs, getIncompleteMethods, getIncompleteResultMaps, getIncompleteStatements, getInterceptors, getJdbcTypeForNull, getKeyGenerator, getKeyGeneratorNames, getKeyGenerators, getLanguageDriver, getLanguageRegistry, getLazyLoadTriggerMethods, getLocalCacheScope, getLogImpl, getLogPrefix, getMappedStatement, getMappedStatement, getMappedStatementNames, getMappedStatements, getMapper, getMapperRegistry, getObjectFactory, getObjectWrapperFactory, getParameterMap, getParameterMapNames, getParameterMaps, getProxyFactory, getReflectorFactory, getResultMap, getResultMapNames, getResultMaps, getSqlFragments, getTypeAliasRegistry, getTypeHandlerRegistry, getVariables, getVfsImpl, hasCache, hasKeyGenerator, hasMapper, hasParameterMap, hasResultMap, hasStatement, hasStatement, isAggressiveLazyLoading, isArgNameBasedConstructorAutoMapping, isCacheEnabled, isCallSettersOnNulls, isLazyLoadingEnabled, isMapUnderscoreToCamelCase, isMultipleResultSetsEnabled, isNullableOnForEach, isResourceLoaded, isReturnInstanceForEmptyRow, isSafeResultHandlerEnabled, isSafeRowBoundsEnabled, isShrinkWhitespacesInSql, isUseActualParamName, isUseColumnLabel, isUseGeneratedKeys, newExecutor, newExecutor, newMetaObject, newParameterHandler, newResultSetHandler, newStatementHandler, parsePendingCacheRefs, parsePendingMethods, parsePendingResultMaps, parsePendingStatements, setAggressiveLazyLoading, setArgNameBasedConstructorAutoMapping, setAutoMappingBehavior, setAutoMappingUnknownColumnBehavior, setCacheEnabled, setCallSettersOnNulls, setConfigurationFactory, setDatabaseId, setDefaultEnumTypeHandler, setDefaultExecutorType, setDefaultFetchSize, setDefaultResultSetType, setDefaultScriptingLanguage, 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
-
字段详细资料
-
idGenerate
默认id生成算法,至少要保持 id 列长度为 16 位字符 或使用 bigint(16) 以上
默认id算法:DefaultIdGenerate
-
-
构造器详细资料
-
MagicConfiguration
public MagicConfiguration() -
MagicConfiguration
-
-
方法详细资料
-
getDataSource
-
setDataSource
-
addMapperXml
添加 mapper xml映射文件。可以是绝对路径的xml、也能是相对路径的xml(ClassPath)
也可以是相对路径的目录: mapper(位于:src/main/resources/mapper)
也可以是绝对目录: C:\Users\Administrator\Desktop\mapperXmlFiles
建议指明xml:
// 文件加载 resources/mapper/UserMapper.xml configuration.addMapperXml("mapper/UserMapper.xml");- 参数:
mapperXml- 相对资源路径下- 返回:
-
getScanMapperXml
-
getIdGenerate
-
setIdGenerate
-
build
public org.apache.ibatis.session.SqlSessionFactory build()
-