I\'m trying to create sessionFactory
bean using spring 3.2 and hibernate 4. I used the following code for that. But the problem is buildSessionFactory()>
You could also write the code without chaining:
LocalSessionFactoryBuilder builder = new LocalSessionFactoryBuilder(dataSource());
builder.scanPackages("com.mypackages");
builder.addProperties(hibernateProperties());
return builder.buildSessionFactory();
Slightly more verbose but not as smelly as @SuppressWarnings("deprecation")