I am using Hibernate in version 3.6.0 and the AnnotationConfiguration is marked as deprecated.
Here is the the line in my HibernateUtil.java class:
sessionFactory = new AnnotationConfiguration().configure("/hib.cfg.xml").buildSessionFactory();
What's the replacement for AnnotationConfiguration?
"All functionality has been moved to Configuration": http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/cfg/AnnotationConfiguration.html
And here is Configuration:
http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/cfg/Configuration.html
Just do this
import org.hibernate.cfg.Configuration;
and then change your code for this
sessionFactory = new Configuration().configure("/hib.cfg.xml").buildSessionFactory();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With