Class DataSourceWrapper

java.lang.Object
org.springframework.jdbc.datasource.DelegatingDataSource
org.springframework.cloud.sleuth.instrument.jdbc.DataSourceWrapper
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource, org.springframework.beans.factory.InitializingBean

public class DataSourceWrapper extends org.springframework.jdbc.datasource.DelegatingDataSource
Returns link of both real DataSource, decorated DataSource.
Since:
3.1.0
Author:
Arthur Gavlyukovskiy
  • Constructor Details

    • DataSourceWrapper

      public DataSourceWrapper(DataSource originalDataSource, DataSource decoratedDataSource)
  • Method Details

    • getOriginalDataSource

      public DataSource getOriginalDataSource()
      Returns original data source, before applying any decorator.
      Returns:
      original data source
    • getDecoratedDataSource

      public DataSource getDecoratedDataSource()
      Returns wrapped data source with the decorator applied.
      Returns:
      decorated data source