Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 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="sic-web-seguranca-context.xml"/>
19
 
20
        <context:spring-configured/>
21
 
22
    <context:annotation-config />
23
 
24
    <context:component-scan base-package="org.primefaces.ultima" />
25
    <context:component-scan base-package="*.jar!org.primefaces.ultima" />
26
 
27
    <context:component-scan base-package="br.edu.cesmac" />
28
    <context:component-scan base-package="*.jar!br.edu.cesmac" />
29
 
30
    <tx:annotation-driven transaction-manager="transactionManager" />
31
 
32
    <!-- Pós-processador de anotações JPA -->
33
        <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
34
 
35
        <!-- Tradutor de exceções JPA -->
36
        <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
37
 
38
        <jee:jndi-lookup id="dataSource" jndi-name="jdbc/sicDS" />
39
 
40
        <jee:jndi-lookup id="scgWsProperties" jndi-name="resource/scgWS" expected-type="java.util.Properties" />
41
 
42
        <!-- Configuração da unidade de persistência -->
43
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
44
                <property name="dataSource" ref="dataSource" />
45
                <property name="persistenceUnitName" value="sicPU"/>
46
        </bean>
47
 
48
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" autowire-candidate="default">
49
        <property name="entityManagerFactory" ref="entityManagerFactory" />
50
    </bean>
51
 
52
    <!-- Habilita suporte a bean validation -->
53
        <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
54
 
55
        <!-- Suporte a annotations @Controller e @RequestMapping a nível de classe -->
56
        <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
57
 
58
        <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
59
            <property name="scopes">
60
                <map>
61
                    <entry key="view">
62
                        <bean class="br.edu.cesmac.web.scope.ViewScope"/>
63
                    </entry>
64
                </map>
65
            </property>
66
        </bean>
67
 
68
</beans>