Browse files

spring-hibernate project refactorings regarding dependency and spring…

… config change
  • Loading branch information...
1 parent 77f5077 commit 6f8fea9aad3da049eeff4d9ee2d55b06e4e2b503 @altfatterz committed May 4, 2012
Showing with 24 additions and 25 deletions.
  1. +2 −2 spring-hibernate/pom.xml
  2. +22 −23 spring-hibernate/src/main/resources/app-context.xml
View
4 spring-hibernate/pom.xml
@@ -18,8 +18,8 @@
<dependency>
<groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>4.1.1.Final</version>
+ <artifactId>hibernate-core</artifactId>
+ <version>4.1.2.Final</version>
<!-- will come with Hibernate core -->
</dependency>
View
45 spring-hibernate/src/main/resources/app-context.xml
@@ -1,34 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
- <context:component-scan base-package="com.infohubble.learning" />
- <jdbc:embedded-database id="dataSource" type="H2" />
+ <context:component-scan base-package="com.infohubble.learning"/>
+ <jdbc:embedded-database id="dataSource" type="H2"/>
- <bean id="sessionFactory"
- class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
- <property name="configLocation" value="classpath:hibernate.cfg.xml" />
- <property name="dataSource" ref="dataSource"></property>
- <property name="annotatedClasses">
- <util:list value-type="java.lang.Class">
- <value>com.infohubble.learning.Order</value>
- <value>com.infohubble.learning.Item</value>
- </util:list>
- </property>
- </bean>
+ <bean id="sessionFactory"
+ class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
+ <property name="configLocation" value="classpath:hibernate.cfg.xml"/>
+ <property name="dataSource" ref="dataSource"></property>
+ <property name="annotatedClasses">
+ <util:list value-type="java.lang.Class">
+ <value>com.infohubble.learning.Order</value>
+ <value>com.infohubble.learning.Item</value>
+ </util:list>
+ </property>
+ </bean>
- <bean id="transactionManager"
- class="org.springframework.orm.hibernate4.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory" />
- </bean>
-
- <context:component-scan base-package="com.infohubble.learning" />
+ <bean id="transactionManager"
+ class="org.springframework.orm.hibernate4.HibernateTransactionManager">
+ <property name="sessionFactory" ref="sessionFactory"/>
+ </bean>
</beans>

0 comments on commit 6f8fea9

Please sign in to comment.