-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
Previously in Spring 2.7 we could inject a EntityManager
Bean into a Service via Constructor
@Service
public class MyService {
private final EntityManager entityManager;
public MyService(EntityManager entityManager){
this.entityManager = entityManager;
}
}
In Spring-Boot this is not possible anymore.
IntelliJ shows in Spring Boot 2.7, that the EntityManager Bean is injected from JpaBaseConfiguration
's factory Method entityManagerFactory
that returns a LocalContainerEntityManagerFactoryBean
.
An alternative could be the @PersistenceContext
annotation. But since I like to get the implementation from application context rather than container context, I would prefer the previous behavior.
Since I did not found anything in the migration guide or on the web I raise this issue here.
Metadata
Metadata
Assignees
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid