Injecting Entitymanager via XML and not annnotations

后端 未结 2 1089
萌比男神i
萌比男神i 2021-02-20 03:44

What I am trying to do is inject through XML almost the same way that is done through A @PersistenceContext annotation. I am in need of this because of the fact I have differen

2条回答
  •  抹茶落季
    2021-02-20 04:12

    Use SharedEntityManagerBean - it creates a shared EntityManager for EntityManagerFactory the same way as @PersistenceContext:

     
        
            
                  
            
        
    
    

提交回复
热议问题