123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <beans
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:jpa="http://www.springframework.org/schema/data/jpa"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
- http://www.springframework.org/schema/data/jpa
- http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-4.1.xsd">
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="locations">
- <list>
- <value>classpath:config.properties</value>
- </list>
- </property>
- </bean>
- <context:component-scan base-package="com.techempower.beyondj"/>
- <jpa:repositories base-package="com.techempower.beyondj"></jpa:repositories>
- <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
- <aop:aspectj-autoproxy proxy-target-class="true" expose-proxy="true"/>
- <bean id="sessionFactory"
- class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
- <property name="dataSource" ref="dataSource"/>
- <property name="configLocation" value="classpath:hibernate.cfg.xml"/>
- </bean>
- <bean id="configProperties"
- class="org.springframework.beans.factory.config.PropertiesFactoryBean">
- <property name="ignoreResourceNotFound" value="true"/>
- <property name="locations">
- <list>
- <value>classpath:config.properties</value>
- </list>
- </property>
- </bean>
- <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource" ref="dataSource"/>
- </bean>
- <!-- <bean id="WorldDataSet" class="com.techempower.beyondj.dataset.WorldDataSet"/>
- -->
- <bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect"/>
- <bean id="jpaVendorAdapter"
- class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
- <property name="database" value="${system.jdbc.database.platform}"/>
- <property name="databasePlatform" value="${system.jdbc.dialect}"/>
- </bean>
- <bean id="entityManagerFactory"
- class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
- <property name="persistenceUnitName" value="beyondj_persistence_unit"/>
- <property name="dataSource" ref="dataSource"/>
- <property name="jpaVendorAdapter" ref="jpaVendorAdapter"/>
- <property name="jpaDialect" ref="jpaDialect"/>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory"/>
- </bean>
- <bean id="dataSource"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="${system.jdbc.driver}"/>
- <property name="url" value="${system.jdbc.url}"/>
- <property name="username" value="${system.jdbc.username}"/>
- <property name="password" value="${system.jdbc.password}"/>
- </bean>
- <bean id="fortuneRepository" class="com.techempower.beyondj.repository.FortuneRepository">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
- <bean id="worldRepositoryImpl" class="com.techempower.beyondj.repository.WorldRepository">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
- </beans>
|