Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
695 blopes 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
                xmlns:jee="http://www.springframework.org/schema/jee"
7
                xmlns:tx="http://www.springframework.org/schema/tx"
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   
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">
19
 
20
        <import resource="spring-security.xml"/>
21
 
22
        <mvc:annotation-driven />
23
 
24
        <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">  
25
        <property name="prefix" value="/WEB-INF/"></property>  
26
        <property name="suffix" value=".jsp"></property>  
27
        </bean>
28
 
29
        <context:spring-configured />
30
 
31
        <context:annotation-config />
32
 
33
        <context:component-scan base-package="br.com.ec" />
34
    <context:component-scan base-package="*.jar!br.com.ec" />
35
 
36
        <!-- Pós-processador de anotações JPA -->
37
        <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
38
 
39
        <!-- Tradutor de exceções JPA -->
40
        <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
41
 
42
        <!-- BANCO DE DADOS (INTERNO) -->
43
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sistemaLAB" />
44
 
45
        <!-- Configuração da unidade de persistência -->
46
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
47
                <property name="dataSource" ref="dataSource" />
48
                <property name="persistenceUnitName" value="sistemaPULAB"/>
49
        </bean>
50
 
51
        <tx:annotation-driven transaction-manager="transactionManager" />
52
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
53
        <property name="entityManagerFactory" ref="entityManagerFactory" />
54
        <!-- <property name="dataSource" ref="dataSource" /> -->
55
    </bean>
56
 
57
    <!-- Habilita suporte a bean validation -->
58
        <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
59
 
60
        <!-- Suporte a annotations @Controller e @RequestMapping a nível de classe --> <!-- RETIRADO APÓS ATUALIZAÇÃO DO SPRINGFRAMEWORK -->       
61
        <!-- <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> -->
62
 
63
        <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
64
            <property name="scopes">
65
                <map>
66
                    <entry key="view">
67
                        <bean class="br.com.ec.web.scope.ViewScope" />
68
                    </entry>
69
                </map>
70
            </property>
71
        </bean>
72
        <!-- BANCO DE DADOS (DEDICADO) -->
73
        <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisDS" /> -->
74
        <!-- BANCO DE DADOS (RANCHOVEIODABARRA) -->
75
        <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisRB" /> -->
76
</beans>