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.
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
FieldsModifier and TypeFieldDescriptionstatic final DataSourceProxyCreationStrategyThe default strategy, which creates a proxy for every eligible data source. -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldCreateProxy(DataSource dataSource, String beanName) Determines whether a proxy should be created for the given data source.
-
Field Details
-
DEFAULT
The default strategy, which creates a proxy for every eligible data source.
-
-
Method Details
-
shouldCreateProxy
Determines whether a proxy should be created for the given data source.- Parameters:
dataSource- the data source beanbeanName- the name of the data source bean- Returns:
trueto create a proxy, orfalseotherwise
-