mainly doc work
This commit is contained in:
parent
4f0baa25c9
commit
a7ea6c8a82
|
@ -1,3 +1,3 @@
|
|||
Spring MVC with Java Configuration
|
||||
Hibernate 3 with Spring
|
||||
=========
|
||||
|
||||
|
|
|
@ -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")));
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Spring MVC with Java Configuration
|
||||
Hibernate 4 with Spring
|
||||
=========
|
||||
|
||||
|
|
Loading…
Reference in New Issue