Closed as not planned
Description
Upon migrating to Jakarta EE and upgrading to Spring 3.0+, we've noticed that the EntityManagerFactory defined in HibernateJpaConfiguration is causing a circular dependency issue with our converters.
Specifically, any custom converter implementing the AttributeConverter interface can no longer have JPA repositories injected into it because they form a cyclic dependency.
┌─────┐
| entityManagerFactory defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]
↑ ↓
| customConverter implementing jakarta.persistence.AttributeConverter<T,M>
↑ ↓
| xService defined in xProject
↑ ↓
| xRepository defined in xProject defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration
↑ ↓
| jpaSharedEM_entityManagerFactory
└─────┘
This issue can be encountered on any spring version > 3.0.0 which requires jakarta.
Metadata
Metadata
Assignees
Labels
No labels