spring-data-relational icon indicating copy to clipboard operation
spring-data-relational copied to clipboard

chore: qualify jdbcMappingContext; expected behaviour for parallel r2dbc usage

Open Stefanqn opened this issue 3 years ago • 3 comments

avoids following code for parallel r2dbc usage:

@EnableJdbcRepositories(
  repositoryFactoryBeanClass = MixedJdbcRepositoryFactoryBean.class
)
...
class MixedJdbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable>
  extends JdbcRepositoryFactoryBean<T, S, ID> {

  public MixedJdbcRepositoryFactoryBean(Class<? extends T> repositoryInterface) {
    super(repositoryInterface);
  }

  @Autowired
  public void setMappingContext(@Qualifier("jdbcMappingContext") RelationalMappingContext mappingContext) {
    super.setMappingContext(mappingContext);
  }
}

Stefanqn avatar Jan 26 '22 15:01 Stefanqn

@Stefanqn Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla avatar Jan 26 '22 15:01 pivotal-cla

@Stefanqn Thank you for signing the Contributor License Agreement!

pivotal-cla avatar Jan 26 '22 15:01 pivotal-cla

We actually should remove auto wiring on the factory bean altogether and handle the wiring externally.

mp911de avatar Jan 27 '22 10:01 mp911de