Interface DataSourceProxyCreationStrategy

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DataSourceProxyCreationStrategy
Strategy used to determine whether an eligible DataSource bean should be wrapped with a proxy.

Applications can provide their own implementation to add custom logic to the proxy creation process, for example based on the data source instance or bean name. Framework-level checks, such as excluded bean names and scoped target detection, are performed before this strategy is invoked.

Since:
1.5.0
Author:
Tadaya Tsuyukubo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The default strategy, which creates a proxy for every eligible data source.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    shouldCreateProxy(DataSource dataSource, String beanName)
    Determines whether a proxy should be created for the given data source.
  • Field Details

  • Method Details

    • shouldCreateProxy

      boolean shouldCreateProxy(DataSource dataSource, String beanName)
      Determines whether a proxy should be created for the given data source.
      Parameters:
      dataSource - the data source bean
      beanName - the name of the data source bean
      Returns:
      true to create a proxy, or false otherwise