Subversion Repositories Integrator Subversion

Rev

Rev 216 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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