I can make required tweaks via:
@EnableR2dbcRepositories(repositoryBaseClass = BaseRepo::class)
but this is too high level. Essentially I override top level method with custom behaviour which needs to be done at R2dbcEntityTemplate.class level so would be great if I could provide custom R2DBC teamplate. I tried declaring bean but it doesn't pick mine, predictably due to being hardcoded in:
/*
* (non-Javadoc)
* @see org.springframework.data.repository.core.support.RepositoryFactorySupport#getTargetRepository(org.springframework.data.repository.core.RepositoryInformation)
*/
@Override
protected Object getTargetRepository(RepositoryInformation information) {
RelationalEntityInformation<?, ?> entityInformation = getEntityInformation(information.getDomainType(),
information);
return getTargetRepositoryViaReflection(information, entityInformation,
new R2dbcEntityTemplate(this.databaseClient, this.dataAccessStrategy), this.converter);
}