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