fixed JavaConfig example

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1433 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Thomas Risberg
2009-06-25 22:02:18 +00:00
parent 7e99af789a
commit a5d4081fef
+5 -3
View File
@@ -343,10 +343,12 @@ public class AppConfig{
@Bean
public SessionFactory sessionFactory() {
// wire up a session factory using
// AnnotationSessionFactoryBean
// wire up a session factory
AnnotationSessionFactoryBean asFactoryBean =
new AnnotationSessionFactoryBean();
asFactoryBean.setDataSource(dataSource());
return (SessionFactory) asFactoryBean.getObject();
// additional config
return asFactoryBean.getObject();
}
@Bean