How to use HibernateTemplate in spring-boot-starter-data-jpa :3.2.1?

68 views Asked by At

i find that HibernateTemplate can not be rightly loaded in new version.

enter image description here

in HibernateTemplate.java , it import the package

org.hibernate.Criteria

but in hibernate-core.6.4.1.Final jar file which comes from spring-boot-starter-data-jpa :3.2.1 i don't find the org.hibernate.Criteria file.

enter image description here

enter image description here

1

There are 1 answers

0
kimler jin On BEST ANSWER

I find that hibernate6 has abandoned the use of HibernateTemplate, and recommends using JPA's API, or directly using Session to operate.