Spring Boot makes it really easy to include a single, default data source. It auto-configures all the required components (TransactionManager, EntityManagerFactory, JpaVendorAdapter, Datasource...).
My issue comes when you want to use multiple datasources. It's not that hard to create the beans manually. However, it does have one unfortunate side-effect; it means that we can't use
Would it be possible to do the following:
Add an annotation for auto-configuring multiple data sources
Would create the following beans:
An additional parameter: "entityManagerFactoryRef" could be added to specify which EntityManagerFactory to use. E.g.