Rev 216 |
Go to most recent revision |
Blame |
Compare with Previous |
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:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<mvc:annotation-driven />
<context:spring-configured/>
<context:component-scan base-package="br.com.ec" />
<context:component-scan base-package="*.jar!br.com.ec" />
<context:annotation-config />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
<!-- 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>
<!--
<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>
-->