Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
- 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/tx
- http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
- <context:annotation-config />
- <context:component-scan base-package="br.com.grupofortes.intranet" />
- <context:component-scan base-package="base.dbunit" />
- <context:property-placeholder location="classpath:configuracoes-test.properties" />
- <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
- <property name="driverClassName" value="org.postgresql.Driver"/>
- <property name="url" value="jdbc:postgresql://localhost:5432/intranet_test"/>
- <property name="username" value="postgres"/>
- <property name="password" value="root"/>
- <property name="suppressClose" value="true" />
- </bean>
- <!-- Configuração do Aspecto das transações. -->
- <tx:advice id="txAdviceIntranet" transaction-manager="transactionManagerIntranet">
- <tx:attributes>
- <tx:method name="*" propagation="REQUIRED" />
- </tx:attributes>
- </tx:advice>
- <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
- <property name="dataSource" ref="dataSource"></property>
- <property name="configLocation" value="classpath:hibernate.cfg.xml" />
- <property name="packagesToScan" value="br.com.grupofortes.intranet" />
- </bean>
- <bean id="transactionManagerIntranet" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory" />
- </bean>
- <aop:config>
- <aop:pointcut id="intranetDaoMethods" expression="execution(* br.com.grupofortes.intranet.dao.impl..*.*(..))" />
- <aop:advisor advice-ref="txAdviceIntranet" pointcut-ref="intranetDaoMethods" />
- </aop:config>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement