configuration = new Configuration();
configuration.configure(<<hibernate.cfg.xml");
You will see the warning
configuration.configure is deprecated.
To get rid of this do the following
Configuration configuration =null;
ServiceRegistry serviceRegistry =null;
try{
configuration = new Configuration();
configuration.configure(hibernateConfigFile);
serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
factory = configuration.buildSessionFactory(serviceRegistry);
}
This will get rid of the warning
No comments :