Spring Boot makes it really easy to include a single, default data source. It auto-configures all the required components (TransactionManager, EntityManagerFactory, JpaVendorAdapter, Datasource...).
The existing @EntityScan is great in that it it allows you to effectively loosely-couple your persistence implementation. Without it, you'd need to hard-code your packagesToScan.
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 @EntityScan. So we're back to hard-coding the packagesToScan parameter.
Would it be possible to do the following:
Add an annotation for auto-configuring multiple data sources
The annotation should trigger behaviour exactly like Spring Boot does with a single data source, but for multiple data sources.