Blame |
Last modification |
View Log
| Download
| RSS feed
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:lang="http://www.springframework.org/schema/lang" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:util="http://www.springframework.org/schema/util"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/lang http://www.springframework.org/schema/lang/spring-lang-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/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
<import resource="sis-web-seguranca-context.xml"/>
<context:spring-configured/>
<context:annotation-config />
<context:component-scan base-package="br.com.ec" />
<context:component-scan base-package="*.jar!br.com.ec" />
<tx:annotation-driven transaction-manager="transactionManager" />
<!-- Pós-processador de anotações JPA -->
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
<!-- Tradutor de exceções JPA -->
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
<!-- BANCO DE DADOS (DEDICADO) -->
<!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisDS" /> -->
<!-- BANCO DE DADOS (INTERNO) -->
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisEC" />
<!-- BANCO DE DADOS (RANCHOVEIODABARRA) -->
<!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisRB" /> -->
<!-- Configuração da unidade de persistência -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="persistenceUnitName" value="sisPU"/>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<!-- Habilita suporte a bean validation -->
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
<!-- Suporte a annotations @Controller e @RequestMapping a nível de classe -->
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="view">
<bean class="br.com.ec.web.scope.ViewScope"/>
</entry>
</map>
</property>
</bean>
</beans>