AbstractSpringEnabledTestContext.xml 3.3 KB

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