mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-08 04:08:19 +00:00
HHH-8674 - fixed usage of deprecated method
Configuration#buildSessionFactory() in documentation
This commit is contained in:
parent
cb215c468d
commit
d0c947c71c
@ -589,9 +589,8 @@ public class HibernateUtil {
|
||||
private static SessionFactory buildSessionFactory() {
|
||||
try {
|
||||
// Create the SessionFactory from hibernate.cfg.xml
|
||||
Configuration configuration = new Configuration();
|
||||
return configuration.configure().buildSessionFactory(new StandardServiceRegistryBuilder()
|
||||
.applySettings(configuration.getProperties()).build());
|
||||
new Configuration().configure().buildSessionFactory(
|
||||
new StandardServiceRegistryBuilder().build() );
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
// Make sure you log the exception, as it might be swallowed
|
||||
|
Loading…
x
Reference in New Issue
Block a user