Rev 207 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 207 | espaco | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <beans xmlns="http://www.springframework.org/schema/beans" |
||
| 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||
| 4 | xmlns:mvc="http://www.springframework.org/schema/mvc" |
||
| 5 | xmlns:context="http://www.springframework.org/schema/context" |
||
| 216 | espaco | 6 | xmlns:jee="http://www.springframework.org/schema/jee" |
| 7 | xmlns:tx="http://www.springframework.org/schema/tx" |
||
| 207 | espaco | 8 | xsi:schemaLocation=" |
| 9 | http://www.springframework.org/schema/mvc |
||
| 10 | http://www.springframework.org/schema/mvc/spring-mvc.xsd |
||
| 11 | http://www.springframework.org/schema/beans |
||
| 12 | http://www.springframework.org/schema/beans/spring-beans.xsd |
||
| 13 | http://www.springframework.org/schema/context |
||
| 216 | espaco | 14 | http://www.springframework.org/schema/context/spring-context.xsd |
| 15 | http://www.springframework.org/schema/jee |
||
| 16 | http://www.springframework.org/schema/jee/spring-jee.xsd |
||
| 17 | http://www.springframework.org/schema/tx |
||
| 18 | http://www.springframework.org/schema/tx/spring-tx.xsd"> |
||
| 207 | espaco | 19 | |
| 216 | espaco | 20 | <mvc:annotation-driven /> |
| 21 | <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> |
||
| 22 | <property name="prefix" value="/WEB-INF/"></property> |
||
| 23 | <property name="suffix" value=".jsp"></property> |
||
| 24 | </bean> |
||
| 25 | |||
| 207 | espaco | 26 | <context:spring-configured/> |
| 27 | |||
| 216 | espaco | 28 | <context:annotation-config /> |
| 29 | |||
| 207 | espaco | 30 | <context:component-scan base-package="br.com.ec" /> |
| 31 | <context:component-scan base-package="*.jar!br.com.ec" /> |
||
| 32 | |||
| 216 | espaco | 33 | <tx:annotation-driven transaction-manager="transactionManager" /> |
| 207 | espaco | 34 | |
| 216 | espaco | 35 | <!-- Pós-processador de anotações JPA --> |
| 207 | espaco | 36 | <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> |
| 37 | |||
| 216 | espaco | 38 | <!-- Tradutor de exceções JPA --> |
| 207 | espaco | 39 | <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/> |
| 40 | |||
| 216 | espaco | 41 | <!-- BANCO DE DADOS (INTERNO) --> |
| 207 | espaco | 42 | <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisEC" /> |
| 216 | espaco | 43 | |
| 44 | <!-- Configuração da unidade de persistência --> |
||
| 207 | espaco | 45 | <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
| 46 | <property name="dataSource" ref="dataSource" /> |
||
| 47 | <property name="persistenceUnitName" value="sisPU"/> |
||
| 48 | </bean> |
||
| 49 | |||
| 50 | <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default"> |
||
| 51 | <property name="entityManagerFactory" ref="entityManagerFactory" /> |
||
| 52 | </bean> |
||
| 53 | |||
| 216 | espaco | 54 | <!-- Habilita suporte a bean validation --> |
| 207 | espaco | 55 | <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/> |
| 56 | |||
| 216 | espaco | 57 | <!-- Suporte a annotations @Controller e @RequestMapping a nível de classe --> <!-- RETIRADO APÓS ATUALIZAÇÃO DO SPRINGFRAMEWORK --> |
| 58 | <!-- <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> --> |
||
| 59 | |||
| 60 | <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> |
||
| 207 | espaco | 61 | <property name="scopes"> |
| 62 | <map> |
||
| 63 | <entry key="view"> |
||
| 64 | <bean class="br.com.ec.web.scope.ViewScope"/> |
||
| 65 | </entry> |
||
| 66 | </map> |
||
| 67 | </property> |
||
| 68 | </bean> |
||
| 216 | espaco | 69 | <!-- BANCO DE DADOS (DEDICADO) --> |
| 70 | <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisDS" /> --> |
||
| 71 | <!-- BANCO DE DADOS (RANCHOVEIODABARRA) --> |
||
| 72 | <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisRB" /> --> |
||
| 73 | </beans> |