Class JdbcSessionRepository.Builder
java.lang.Object
org.springframework.ai.session.jdbc.JdbcSessionRepository.Builder
- Enclosing class:
- JdbcSessionRepository
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the repository.dataSource(DataSource dataSource) The data source; the dialect is detected from it unless set.dialect(JdbcSessionRepositoryDialect dialect) The SQL dialect; detected withJdbcSessionRepositoryDialect.from(DataSource)by default.indexedAttributes(Set<String> indexedAttributes) The metadata keys indexed inAI_SESSION_INDEX, so thatJdbcSessionRepository.findByMetadata(java.lang.String, java.lang.String)answers for them; theJdbcSessionRepository.DEFAULT_INDEXED_ATTRIBUTES, the principal, are always indexed.jdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) A configuredJdbcTemplate, instead of one on the data source.jsonMapper(tools.jackson.databind.json.JsonMapper jsonMapper) The mapper of the metadata and payload JSON;JsonMapper.builder().build()by default.transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) The transaction manager; one on the data source by default.
-
Method Details
-
indexedAttributes
The metadata keys indexed inAI_SESSION_INDEX, so thatJdbcSessionRepository.findByMetadata(java.lang.String, java.lang.String)answers for them; theJdbcSessionRepository.DEFAULT_INDEXED_ATTRIBUTES, the principal, are always indexed. -
dataSource
The data source; the dialect is detected from it unless set. -
jdbcTemplate
public JdbcSessionRepository.Builder jdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) A configuredJdbcTemplate, instead of one on the data source. -
dialect
The SQL dialect; detected withJdbcSessionRepositoryDialect.from(DataSource)by default. -
transactionManager
public JdbcSessionRepository.Builder transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) The transaction manager; one on the data source by default. -
jsonMapper
The mapper of the metadata and payload JSON;JsonMapper.builder().build()by default. -
build
Builds the repository.
-