Advertisement
francoisandre

Untitled

Apr 6th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2. xmlns:jpa="http://www.springframework.org/schema/data/jpa"
  3. xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xmlns:tx="http://www.springframework.org/schema/tx"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/data/jpa
  7. http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
  8.  
  9.  
  10.  
  11. <context:component-scan base-package="fr.bge" />
  12.  
  13. <!-- <bean id="dataSource"
  14. class="org.springframework.jdbc.datasource.DriverManagerDataSource"
  15. p:driverClassName="org.postgresql.Driver" p:url="jdbc:postgresql://localhost:5432/springbatch"
  16. p:username="springbatch" p:password="springbatch" />
  17. -->
  18.  
  19. <bean id="dataSource"
  20. class="org.springframework.jdbc.datasource.DriverManagerDataSource"
  21. p:driverClassName="org.apache.derby.jdbc.ClientDriver" p:url="jdbc:derby://localhost:1527/station"
  22. p:username="app" p:password="app" />
  23.  
  24.  
  25. <bean id="entityManagerFactory"
  26. class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
  27. p:dataSource-ref="dataSource" p:persistence-unit-name="jpa">
  28. <property name="jpaVendorAdapter">
  29. <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
  30. p:database="DERBY" p:databasePlatform="org.hibernate.dialect.DerbyDialect"
  31. p:showSql="true" p:generate-ddl="true" />
  32. </property>
  33. </bean>
  34.  
  35. <!-- <bean id="entityManagerFactory"
  36. class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
  37. p:dataSource-ref="dataSource" p:persistence-unit-name="jpa">
  38. <property name="jpaVendorAdapter">
  39. <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
  40. p:database="POSTGRESQL" p:databasePlatform="org.hibernate.dialect.PostgreSQLDialect"
  41. p:showSql="true" p:generate-ddl="true" />
  42. </property>
  43. </bean> -->
  44.  
  45. <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"
  46. p:entityManagerFactory-ref="entityManagerFactory" />
  47.  
  48. <context:annotation-config />
  49. <tx:annotation-driven />
  50.  
  51. <bean id="stationdao" class="fr.bge.springbatch.StationDAORepositoryImpl" />
  52.  
  53. <bean id="pagedstationdao" class="fr.bge.springbatch.PagedStationDAORepositoryImpl" />
  54.  
  55. <jpa:repositories base-package="fr.bge" />
  56.  
  57. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement