Class MultitenantDataSource

java.lang.Object
org.springframework.jdbc.datasource.AbstractDataSource
org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
spring.tenant.jpa.MultitenantDataSource
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource, org.springframework.beans.factory.InitializingBean

public class MultitenantDataSource extends org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource
  • Field Summary

    Fields inherited from class org.springframework.jdbc.datasource.AbstractDataSource

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
     

    Methods inherited from class org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource

    afterPropertiesSet, createConnectionBuilder, createShardingKeyBuilder, determineTargetDataSource, getConnection, getConnection, getResolvedDataSources, getResolvedDefaultDataSource, initialize, isWrapperFor, resolveSpecifiedDataSource, resolveSpecifiedLookupKey, setDataSourceLookup, setDefaultTargetDataSource, setLenientFallback, setTargetDataSources, unwrap

    Methods inherited from class org.springframework.jdbc.datasource.AbstractDataSource

    getLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriter

    Methods inherited from class Object

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

    • MultitenantDataSource

      public MultitenantDataSource()
  • Method Details

    • determineCurrentLookupKey

      protected String determineCurrentLookupKey()
      Specified by:
      determineCurrentLookupKey in class org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource