@Configuration(proxyBeanMethods=false) public class AbstractJdbcConfiguration extends Object
Constructor and Description |
---|
AbstractJdbcConfiguration() |
@Bean public JdbcMappingContext jdbcMappingContext(Optional<NamingStrategy> namingStrategy, JdbcCustomConversions customConversions)
JdbcMappingContext
and apply an optional NamingStrategy
.namingStrategy
- optional NamingStrategy
. Use NamingStrategy.INSTANCE
as fallback.customConversions
- see jdbcCustomConversions()
.@Bean public JdbcConverter jdbcConverter(JdbcMappingContext mappingContext, NamedParameterJdbcOperations operations, @Lazy RelationResolver relationResolver, JdbcCustomConversions conversions)
RelationalConverter
using the configured
jdbcMappingContext(Optional, JdbcCustomConversions)
. Will get jdbcCustomConversions()
applied.jdbcMappingContext(Optional, JdbcCustomConversions)
,
jdbcCustomConversions()
@Bean public JdbcCustomConversions jdbcCustomConversions()
Converter
s in a JdbcCustomConversions
object if required. These
JdbcCustomConversions
will be registered with the
jdbcConverter(JdbcMappingContext, NamedParameterJdbcOperations, RelationResolver, JdbcCustomConversions)
.
Returns an empty JdbcCustomConversions
instance by default.@Bean public JdbcAggregateTemplate jdbcAggregateTemplate(ApplicationContext applicationContext, JdbcMappingContext mappingContext, JdbcConverter converter, DataAccessStrategy dataAccessStrategy)
JdbcAggregateTemplate
as a bean for easy use in applications that need a lower level of
abstraction than the normal repository abstraction.applicationContext
- for publishing events. Must not be null.mappingContext
- the mapping context to be used. Must not be null.converter
- the conversions used when reading and writing from/to the database. Must not be null.JdbcAggregateTemplate
. Will never be null.@Bean public DataAccessStrategy dataAccessStrategyBean(NamedParameterJdbcOperations operations, JdbcConverter jdbcConverter, JdbcMappingContext context, Dialect dialect)
DataAccessStrategy
for reuse in the JdbcAggregateOperations
and the JdbcConverter
.
Override this method to register a bean of type DataAccessStrategy
if your use case requires a more
specialized DataAccessStrategy
.Copyright © 2017–2020 Pivotal Software, Inc.. All rights reserved.