To quote the relevant parts from the original ticket, Sam suggested the following:
The Spring Data JPA team should consider fixing this. We can foresee at least two options here: Use a well-defined bean name for the SharedEntityManagerCreator instead of a generated unique name. Instead of directly using BeanDefinitionReaderUtils.registerWithGeneratedName(…) to register the SharedEntityManagerCreator, SD JPA could detect if there is already a SharedEntityManagerCreator bean with an identical bean definition (excluding the bean name) before creating another one with a different generated name.
I guess we could tweak EntityManagerBeanDefinitionRegistrarPostProcessor to defensively check for the presence of SharedEntityManagerCreator instances via BeanFactoryUtils.beanNamesForTypeIncludingAncestors(…) and inspect the BeanDefinition instances for the found names and inspect them for whether they refer to the EntityManagerFactory we're trying to create the creator for.
Sorry for my ignorance and sorry to bother you, but how exactly do I specify release 5.2.5 as my dependency so that I can just work around this error for now? I'm actually a bit new to the whole Java ecosystem so I might be doing something wrong.