Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

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