Subversion Repositories Integrator Subversion

Rev

Rev 140 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
106 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" xmlns:aop="http://www.springframework.org/schema/aop"
4
        xmlns:context="http://www.springframework.org/schema/context"
5
        xmlns:lang="http://www.springframework.org/schema/lang" xmlns:tx="http://www.springframework.org/schema/tx"
6
        xmlns:jee="http://www.springframework.org/schema/jee" xmlns:util="http://www.springframework.org/schema/util"
7
        xmlns:jaxws="http://cxf.apache.org/jaxws"
8
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
9
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
10
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
11
       http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
12
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
13
       http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
14
       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
15
       http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
16
       http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">
17
 
18
        <import resource="sis-web-seguranca-context.xml"/>
19
 
20
        <context:spring-configured/>
21
 
22
    <context:annotation-config />
23
 
24
    <context:component-scan base-package="br.com.ec" />
25
    <context:component-scan base-package="*.jar!br.com.ec" />
26
 
27
    <!-- EXCLUIR LINHAS -->
28
    <context:component-scan base-package="br.edu.cesmac" />
29
    <context:component-scan base-package="*.jar!br.edu.cesmac" />
30
 
31
    <tx:annotation-driven transaction-manager="transactionManager" />
32
 
33
    <!-- Pós-processador de anotações JPA -->
34
        <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
35
 
36
        <!-- Tradutor de exceções JPA -->
37
        <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
38
 
39
        <!-- BANCO DE DADOS -->
40
        <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisDS" /> -->
41
 
42
        <!-- BANCO DE DADOS (NOVO) -->
43
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisEC" />
44
 
45
        <!-- BANCO DE DADOS (RANCHOVEIODABARRA) -->
46
        <!-- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sisRB" /> -->
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="sisPU"/>
52
        </bean>
53
 
54
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default">
55
        <property name="entityManagerFactory" ref="entityManagerFactory" />
56
    </bean>
57
 
58
    <!-- Habilita suporte a bean validation -->
59
        <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
60
 
61
        <!-- Suporte a annotations @Controller e @RequestMapping a nível de classe -->
62
        <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
63
 
64
        <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
65
            <property name="scopes">
66
                <map>
67
                    <entry key="view">
68
                        <bean class="br.edu.cesmac.web.scope.ViewScope"/>
69
                    </entry>
70
                </map>
71
            </property>
72
        </bean>
73
 
74
</beans>