Class Configuration

java.lang.Object
org.apache.ibatis.session.Configuration
cn.lm.mybatis.mapper.session.Configuration

public class Configuration extends org.apache.ibatis.session.Configuration
使用提供的 Configuration 可以在纯 Java 或者 Spring(mybatis-spring-1.3.0+) 模式中使用
Author:
liuzh
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.ibatis.session.Configuration

    org.apache.ibatis.session.Configuration.StrictMap<V extends Object>
  • Field Summary

    Fields inherited from class 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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMappedStatement(org.apache.ibatis.mapping.MappedStatement ms)
     
    void
    setConfig(Config config)
    使用 Config 配置
    void
    直接注入 mapperHelper
    void
    使用属性方式配置

    Methods inherited from class org.apache.ibatis.session.Configuration

    addCache, addCacheRef, addIncompleteCacheRef, addIncompleteMethod, addIncompleteResultMap, addIncompleteStatement, addInterceptor, addKeyGenerator, addLoadedResource, 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Configuration

      public Configuration()
  • Method Details

    • setMapperHelper

      public void setMapperHelper(MapperHelper mapperHelper)
      直接注入 mapperHelper
      Parameters:
      mapperHelper -
    • setMapperProperties

      public void setMapperProperties(Properties properties)
      使用属性方式配置
      Parameters:
      properties -
    • setConfig

      public void setConfig(Config config)
      使用 Config 配置
      Parameters:
      config -
    • addMappedStatement

      public void addMappedStatement(org.apache.ibatis.mapping.MappedStatement ms)
      Overrides:
      addMappedStatement in class org.apache.ibatis.session.Configuration