diff --git a/spring-hibernate3-dao/README.md b/spring-hibernate3-dao/README.md index afb2185d60..89dd04db82 100644 --- a/spring-hibernate3-dao/README.md +++ b/spring-hibernate3-dao/README.md @@ -1,3 +1,3 @@ -Spring MVC with Java Configuration +Hibernate 3 with Spring ========= diff --git a/spring-hibernate3-dao/src/main/java/org/baeldung/spring/persistence/config/PersistenceConfig.java b/spring-hibernate3-dao/src/main/java/org/baeldung/spring/persistence/config/PersistenceConfig.java index e8f448f4c2..b59ea8e341 100644 --- a/spring-hibernate3-dao/src/main/java/org/baeldung/spring/persistence/config/PersistenceConfig.java +++ b/spring-hibernate3-dao/src/main/java/org/baeldung/spring/persistence/config/PersistenceConfig.java @@ -33,7 +33,7 @@ public class PersistenceConfig { @Bean public AnnotationSessionFactoryBean sessionFactory() { final AnnotationSessionFactoryBean sessionFactory = new AnnotationSessionFactoryBean(); - sessionFactory.setDataSource(restDataSource()); + sessionFactory.setDataSource(dataSource()); sessionFactory.setPackagesToScan(new String[] { "org.baeldung.spring.persistence.model" }); sessionFactory.setHibernateProperties(hibernateProperties()); @@ -41,7 +41,7 @@ public class PersistenceConfig { } @Bean - public DataSource restDataSource() { + public DataSource dataSource() { final DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(Preconditions.checkNotNull(env.getProperty("jdbc.driverClassName"))); dataSource.setUrl(Preconditions.checkNotNull(env.getProperty("jdbc.url"))); diff --git a/spring-hibernate4-dao/README.md b/spring-hibernate4-dao/README.md index afb2185d60..12eb079c88 100644 --- a/spring-hibernate4-dao/README.md +++ b/spring-hibernate4-dao/README.md @@ -1,3 +1,3 @@ -Spring MVC with Java Configuration +Hibernate 4 with Spring =========