类 MapperManager

java.lang.Object
com.alibaba.nacos.plugin.datasource.MapperManager

public class MapperManager extends Object
DataSource Plugin Mapper Management.
作者:
hyx
  • 字段详细资料

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • MAPPER_SPI_MAP

      public static final Map<String,Map<String,Mapper>> MAPPER_SPI_MAP
    • INSTANCE

      private static final MapperManager INSTANCE
    • dataSourceLogEnable

      private boolean dataSourceLogEnable
  • 构造器详细资料

    • MapperManager

      private MapperManager()
  • 方法详细资料

    • instance

      public static MapperManager instance(boolean isDataSourceLogEnable)
      Get the instance of MapperManager.
      返回:
      The instance of MapperManager.
    • loadInitial

      public void loadInitial()
      The init method.
    • join

      public static void join(Mapper mapper)
      To join mapper in MAPPER_SPI_MAP.
      参数:
      mapper - The mapper you want join.
    • putMapper

      private static void putMapper(Mapper mapper)
    • findMapper

      public <R extends Mapper> R findMapper(String dataSource, String tableName)
      Get the mapper by table name.
      参数:
      dataSource - the datasource.
      tableName - table name.
      返回:
      mapper.