Subversion Repositories Integrator Subversion

Rev

Rev 207 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 207 Rev 216
Line 1... Line 1...
1
<?xml version="1.0" encoding="UTF-8"?>  
1
<?xml version="1.0" encoding="UTF-8"?>  
2
<beans xmlns="http://www.springframework.org/schema/beans"  
2
<beans xmlns="http://www.springframework.org/schema/beans"  
3
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
3
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
4
xmlns:mvc="http://www.springframework.org/schema/mvc"  
4
xmlns:mvc="http://www.springframework.org/schema/mvc"  
5
xmlns:context="http://www.springframework.org/schema/context"  
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"
6
xsi:schemaLocation="  
8
xsi:schemaLocation="  
7
http://www.springframework.org/schema/mvc  
9
http://www.springframework.org/schema/mvc  
8
http://www.springframework.org/schema/mvc/spring-mvc.xsd  
10
http://www.springframework.org/schema/mvc/spring-mvc.xsd  
9
http://www.springframework.org/schema/beans  
11
http://www.springframework.org/schema/beans  
10
http://www.springframework.org/schema/beans/spring-beans.xsd  
12
http://www.springframework.org/schema/beans/spring-beans.xsd  
11
http://www.springframework.org/schema/context   
13
http://www.springframework.org/schema/context   
12
http://www.springframework.org/schema/context/spring-context.xsd">  
-
 
13
<mvc:annotation-driven />
-
 
-
 
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">
14
19
-
 
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
       
15
        <context:spring-configured/>
26
        <context:spring-configured/>
16
27
-
 
28
        <context:annotation-config />
-
 
29
       
17
        <context:component-scan base-package="br.com.ec" />
30
        <context:component-scan base-package="br.com.ec" />
18
    <context:component-scan base-package="*.jar!br.com.ec" />
31
    <context:component-scan base-package="*.jar!br.com.ec" />
19
       
32
       
20
        <context:annotation-config />
-
 
-
 
33
        <tx:annotation-driven transaction-manager="transactionManager" />
21
       
34
       
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
-
 
-
 
35
        <!-- Pós-processador de anotações JPA -->
55
        <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
36
        <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
56
        
37
       
57
        Tradutor de exceções JPA
-
 
-
 
38
        <!-- Tradutor de exceções JPA -->
58
        <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
39
        <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
59
        
40
       
60
        BANCO DE DADOS (DEDICADO)
-
 
61
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisDS" />
-
 
62
        
-
 
63
        BANCO DE DADOS (INTERNO)
-
 
-
 
41
        <!-- BANCO DE DADOS (INTERNO) -->
64
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisEC" />
42
        <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
-
 
-
 
43
       
-
 
44
        <!-- Configuração da unidade de persistência -->
70
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
45
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
71
                <property name="dataSource" ref="dataSource" />
46
                <property name="dataSource" ref="dataSource" />
72
                <property name="persistenceUnitName" value="sisPU"/>
47
                <property name="persistenceUnitName" value="sisPU"/>
73
        </bean>
48
        </bean>
74
49
75
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default">
50
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default">
76
        <property name="entityManagerFactory" ref="entityManagerFactory" />
51
        <property name="entityManagerFactory" ref="entityManagerFactory" />
77
    </bean>
52
    </bean>
78
    
53
   
79
    Habilita suporte a bean validation
-
 
-
 
54
    <!-- Habilita suporte a bean validation -->
80
        <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
55
        <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
        
56
       
85
        <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
-
 
-
 
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">
86
            <property name="scopes">
61
            <property name="scopes">
87
                <map>
62
                <map>
88
                    <entry key="view">
63
                    <entry key="view">
89
                        <bean class="br.com.ec.web.scope.ViewScope"/>
64
                        <bean class="br.com.ec.web.scope.ViewScope"/>
90
                    </entry>
65
                    </entry>
91
                </map>
66
                </map>
92
            </property>
67
            </property>
93
        </bean>
68
        </bean>
94
         -->
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>