Closed
Description
The reference documentation suggests to use EntityManagerFactoryBuilder
to setup EntityManagerFactory
instances in case one has to configure multiple ones. Unfortunately, the code shown doesn't work as the EMFB
bean is created by JpaAutoConfiguration
which expects a singular DataSource
instance in the first place. Manually excluding that configuration then results in the EMFB
not being present and the invocation of the factory method failing.
Maybe the auto-configuration for EMFB
can be moved to a separate class that is not dependent on a single DataSource
instance?