Why did I need to define a Hibernate-JPA vendor adapter in my Spring application context?

后端 未结 2 807
不思量自难忘°
不思量自难忘° 2021-02-05 14:53

I spent days and days trying to get a working database connection for my Spring/JPA(Hibernate) integration tests, troubleshooting mysterious \"No Database Context Found\" errors

2条回答
  •  无人共我
    2021-02-05 15:21

    I just found the answer to my question in a post on coderanch.com.

    Looks like I can circumvent the use of a JpaVendorAdapter if I just specify the JPA provider inside the persistence unit definition in persistence.xml like this:

    
        org.hibernate.ejb.HibernatePersistence
                .
                .
                .
    

提交回复
热议问题