As Johnny already pointed out, the specifics of your EntityManager configuration are not that much Axon specific at all.
Providing an EntityManager just for Axon entities, means you need to take the DomainEventEntry, SnapshotEventEntry, TokenEntry, AssociationValueEntry and SagaEntry in to account.
A quick search on the right version in the framework’s repository should give you the correct packages you need to set on it.
When it comes to configuring, this can go two ways, which currently isn’t clear given the issue description:
- If you are using Axon’s Configuration API, you can simply use the
DefautlConfigurer.jpaConfiguration(EntityManagerProvider, TransactionManager) to set your own EntityManagerProvider bean everywhere you need it.
- If you are using the Spring Boot auto configuration you can simply provide an EntityManagerProvider bean. The
[JpaEventStoreAutoConfiguration](https://github.com/AxonFramework/AxonFramework/blob/master/spring-boot-autoconfigure/src/main/java/org/axonframework/springboot/autoconfig/JpaEventStoreAutoConfiguration.java) will pick this up automatically and set it for you.
Thus, based on your “why can’t axon auto configure them” statement, I would assume something else is amiss in your configuration if the above shared doesn’t solve it.
Hope this helps Chun, nice to see you back on the forum.