indu iyengar wrote:Hi all
Am integrating Spring with Hibernate. Am using hibernate-cfg.xml for mappings and etc.. Can we write all the details of hibernate-cfg file in spring-config.xml with out seperate hibernate-cfg.xml ?
Yes configure a bean where the class is LocalSessionFactoryBean or one of its subclasses like AnnotationSessionFactoryBean, now you can set hibernateProperties property to include the property settings, set the mappingLocation property to map to the hbm.xml files and packagesToScan for scanning for @Entity
All the details are in the SpringSource documentation on www.springframework.org
Mark