Rev 216 | Go to most recent revision | Details | 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" |
||
| 6 | xsi:schemaLocation=" |
||
| 7 | http://www.springframework.org/schema/mvc |
||
| 8 | http://www.springframework.org/schema/mvc/spring-mvc.xsd |
||
| 9 | http://www.springframework.org/schema/beans |
||
| 10 | http://www.springframework.org/schema/beans/spring-beans.xsd |
||
| 11 | http://www.springframework.org/schema/context |
||
| 12 | http://www.springframework.org/schema/context/spring-context.xsd"> |
||
| 13 | <mvc:annotation-driven /> |
||
| 14 | |||
| 15 | <context:spring-configured/> |
||
| 16 | |||
| 17 | <context:component-scan base-package="br.com.ec" /> |
||
| 18 | <context:component-scan base-package="*.jar!br.com.ec" /> |
||
| 19 | |||
| 20 | <context:annotation-config /> |
||
| 21 | |||
| 22 | <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> |
||
| 23 | <property name="prefix" value="/WEB-INF/"></property> |
||
| 24 | <property name="suffix" value=".jsp"></property> |
||
| 25 | </bean> |
||
| 26 | |||
| 27 | <!-- Suporte a annotations @Controller e @RequestMapping a nível de classe |
||
| 28 | <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> |
||
| 29 | --> |
||
| 30 | |||
| 31 | <!-- |
||
| 32 | <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> |
||
| 33 | <property name="scopes"> |
||
| 34 | <map> |
||
| 35 | <entry key="view"> |
||
| 36 | <bean class="br.com.ec.web.scope.ViewScope"/> |
||
| 37 | </entry> |
||
| 38 | </map> |
||
| 39 | </property> |
||
| 40 | </bean> --> |
||
| 41 | </beans> |
||
| 42 | <!-- |
||
| 43 | <import resource="sis-web-seguranca-context.xml"/> |
||
| 44 | |||
| 45 | <context:spring-configured/> |
||
| 46 | |||
| 47 | <context:annotation-config /> |
||
| 48 | |||
| 49 | <context:component-scan base-package="br.com.ec" /> |
||
| 50 | <context:component-scan base-package="*.jar!br.com.ec" /> |
||
| 51 | |||
| 52 | <tx:annotation-driven transaction-manager="transactionManager" /> |
||
| 53 | |||
| 54 | Pós-processador de anotações JPA |
||
| 55 | <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> |
||
| 56 | |||
| 57 | Tradutor de exceções JPA |
||
| 58 | <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/> |
||
| 59 | |||
| 60 | BANCO DE DADOS (DEDICADO) |
||
| 61 | <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisDS" /> |
||
| 62 | |||
| 63 | BANCO DE DADOS (INTERNO) |
||
| 64 | <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisEC" /> |
||
| 65 | |||
| 66 | BANCO DE DADOS (RANCHOVEIODABARRA) |
||
| 67 | <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisRB" /> |
||
| 68 | |||
| 69 | Configuração da unidade de persistência |
||
| 70 | <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
||
| 71 | <property name="dataSource" ref="dataSource" /> |
||
| 72 | <property name="persistenceUnitName" value="sisPU"/> |
||
| 73 | </bean> |
||
| 74 | |||
| 75 | <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default"> |
||
| 76 | <property name="entityManagerFactory" ref="entityManagerFactory" /> |
||
| 77 | </bean> |
||
| 78 | |||
| 79 | Habilita suporte a bean validation |
||
| 80 | <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/> |
||
| 81 | |||
| 82 | Suporte a annotations @Controller e @RequestMapping a nível de classe |
||
| 83 | <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> |
||
| 84 | |||
| 85 | <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"> |
||
| 86 | <property name="scopes"> |
||
| 87 | <map> |
||
| 88 | <entry key="view"> |
||
| 89 | <bean class="br.com.ec.web.scope.ViewScope"/> |
||
| 90 | </entry> |
||
| 91 | </map> |
||
| 92 | </property> |
||
| 93 | </bean> |
||
| 94 | --> |