AbstractSpringEnabledTransactionalTestContext.xml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE beans PUBLIC
  3. "-//SPRING//DTD BEAN//EN"
  4. "http://www.springframework.org/dtd/spring-beans.dtd">
  5. <beans>
  6. <bean id="testPropertyConfigurer"
  7. class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  8. <property name="locations">
  9. <list>
  10. <value>classpath:/test.properties</value>
  11. <value>classpath:/env.properties</value>
  12. </list>
  13. </property>
  14. </bean>
  15. <bean id="domainObjectFactory" class="magoffin.matt.ieat.biz.impl.JAXBDomainObjectFactoryImpl"/>
  16. <bean id="applicationInitializer" class="magoffin.matt.ieat.test.AppContextInitializer">
  17. <property name="domainObjectFactory"><ref bean="domainObjectFactory"/></property>
  18. <property name="environment"><value>classpath:/env.properties</value></property>
  19. </bean>
  20. <bean id="myDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  21. <property name="driverClassName"><value>${jdbc.driver}</value></property>
  22. <property name="url"><value>${jdbc.url}</value></property>
  23. <property name="username"><value>${jdbc.user}</value></property>
  24. <property name="password"><value>${jdbc.pass}</value></property>
  25. </bean>
  26. <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
  27. <property name="host"><value>${smtp.host}</value></property>
  28. </bean>
  29. <bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  30. <property name="dataSource"><ref local="myDataSource"/></property>
  31. <property name="mappingResources">
  32. <list>
  33. <value>ieat.hbm.xml</value>
  34. <value>magoffin/matt/ieat/domain/Base.hbm.xml</value>
  35. <value>magoffin/matt/ieat/domain/Course.hbm.xml</value>
  36. <value>magoffin/matt/ieat/domain/Difficulty.hbm.xml</value>
  37. <value>magoffin/matt/ieat/domain/Ethnicity.hbm.xml</value>
  38. <value>magoffin/matt/ieat/domain/Ingredient.hbm.xml</value>
  39. <value>magoffin/matt/ieat/domain/Meal.hbm.xml</value>
  40. <value>magoffin/matt/ieat/domain/MealRecipe.hbm.xml</value>
  41. <value>magoffin/matt/ieat/domain/PrepTime.hbm.xml</value>
  42. <value>magoffin/matt/ieat/domain/Recipe.hbm.xml</value>
  43. <value>magoffin/matt/ieat/domain/RecipeComment.hbm.xml</value>
  44. <value>magoffin/matt/ieat/domain/RecipeIngredient.hbm.xml</value>
  45. <value>magoffin/matt/ieat/domain/RecipeRating.hbm.xml</value>
  46. <value>magoffin/matt/ieat/domain/RecipeStep.hbm.xml</value>
  47. <value>magoffin/matt/ieat/domain/RelatedRecipe.hbm.xml</value>
  48. <value>magoffin/matt/ieat/domain/RelationKind.hbm.xml</value>
  49. <value>magoffin/matt/ieat/domain/System.hbm.xml</value>
  50. <value>magoffin/matt/ieat/domain/Unit.hbm.xml</value>
  51. <value>magoffin/matt/ieat/domain/User.hbm.xml</value>
  52. </list>
  53. </property>
  54. <property name="hibernateProperties">
  55. <props>
  56. <prop key="hibernate.dialect">${hibernate.dialect}</prop>
  57. <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
  58. <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
  59. <prop key="hibernate.max_fetch_depth">4</prop>
  60. </props>
  61. </property>
  62. </bean>
  63. <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  64. <property name="sessionFactory"><ref local="mySessionFactory"/></property>
  65. <property name="dataSource"><ref local="myDataSource"/></property>
  66. </bean>
  67. </beans>