Advertisement
tadeuespindola

antenor-caixaki-application-context-xml

Mar 10th, 2023
986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.01 KB | Help | 0 0
  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:context="http://www.springframework.org/schema/context"
  4.     xmlns:mvc="http://www.springframework.org/schema/mvc"
  5.     xmlns:tx = "http://www.springframework.org/schema/tx"
  6.     xsi:schemaLocation="http://www.springframework.org/schema/mvc
  7.     http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
  8.     http://www.springframework.org/schema/beans
  9.    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  10.    http://www.springframework.org/schema/context
  11.    http://www.springframework.org/schema/context/spring-context-3.0.xsd
  12.    http://www.springframework.org/schema/tx
  13.    http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
  14.     default-lazy-init="true">
  15.    
  16.    
  17.     <context:annotation-config />
  18.     <mvc:annotation-driven />
  19.     <mvc:default-servlet-handler />
  20.    
  21.     <mvc:resources location="/resources/img"
  22.         mapping="/resources/**" cache-period="5000" />
  23.    
  24.     <context:component-scan base-package="jsfprimefaces.geral.controller" />
  25.     <context:component-scan base-package="jsfprimefaces.srv.interfaces" />
  26.     <context:component-scan base-package="jsfprimefaces.srv.implementacao" />
  27.     <context:component-scan base-package="jsfprimefaces.repository.interfaces" />
  28.     <context:component-scan base-package="jsfprimefaces.dao.implementacao" />
  29.     <context:component-scan base-package="jsfprimefaces.bean.view" />
  30.     <context:component-scan base-package="jsfprimefaces.bean.geral" />
  31.     <context:component-scan base-package="jsfprimefaces.report.util" />
  32.     <context:component-scan base-package="jsfprimefaces.util.all" />
  33.     <context:component-scan base-package="jsfprimefaces.bean.view.grafico" />
  34.     <context:component-scan base-package="jsfprimefaces.controller.crud" />
  35.     <context:component-scan base-package="jsfprimefaces.interfac.crud" />
  36.    
  37.     <!-- Data Source -->
  38.     <bean id="springDataSource" name="springDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="false">
  39.         <property name="jndiName">
  40.             <value>java:comp/env/jdbc/datasource</value>
  41.         </property>
  42.     </bean>
  43.    
  44.     <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate" lazy-init="false">
  45.         <property name="dataSource" ref="springDataSource"/>
  46.         <property name="baselineOnMigrate" value="true"/>  
  47.         <property name="table" value="version"/>
  48.         <property name="sqlMigrationPrefix" value="v"/>
  49.         <property name="sqlMigrationSeparator" value="_"/>
  50.         <property name="encoding" value="ISO-8859-1"/>
  51.         <property name="validateOnMigrate" value="false"/>
  52.     </bean>
  53.    
  54.      <bean id="transactionManager" name="transactionManager"  
  55.         class="org.springframework.jdbc.datasource.DataSourceTransactionManager" lazy-init="false">
  56.          <property name="dataSource" ref="springDataSource"/>
  57.      </bean>  
  58.    
  59.      
  60.      <bean id="jdbcTemplate" name="jdbcTemplate" class="jsfprimefaces.implementacao.crud.JdbcTemplateImpl" lazy-init="false">
  61.         <constructor-arg name="dataSource" ref="springDataSource"/>
  62.      </bean>
  63.    
  64.      <bean id="simpleJdbcTemplate" name="simpleJdbcTemplate" class="jsfprimefaces.implementacao.crud.SimpleJdbcTemplateImpl" lazy-init="false">
  65.         <constructor-arg name="dataSource" ref="springDataSource"/>
  66.      </bean>
  67.    
  68.       <bean id="simpleJdbcInsert" name="simpleJdbcInsert" class="jsfprimefaces.implementacao.crud.SimpleJdbcInsertImplements" lazy-init="false">
  69.         <constructor-arg name="dataSource" ref="springDataSource"/>
  70.      </bean>
  71.    
  72.       <bean id="simpleJdbcClassImpl" name="simpleJdbcClassImpl" class="jsfprimefaces.implementacao.crud.SimpleJdbcClassImpl" lazy-init="false">
  73.          <constructor-arg name="dataSource" ref="springDataSource"/>
  74.      </bean>
  75.    
  76.     <!-- Mapeamento caso venha utilizar jsp -->
  77.     <bean id="urlMapping"
  78.         class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping" lazy-init="false">
  79.         <property name="mappings">
  80.             <props>
  81.                 <prop key="/index.jsp">indexController</prop>
  82.             </props>
  83.         </property>
  84.     </bean>
  85.    
  86.     <!-- Mapeamento caso venha utilizar jsp -->
  87.     <bean id="viewResolver"
  88.         class="org.springframework.web.servlet.view.InternalResourceViewResolver" lazy-init="false">
  89.         <property name="viewClass"
  90.             value="org.springframework.web.servlet.view.JstlView" />
  91.         <property name="prefix" value="/WebContent/" />
  92.         <property name="suffix" value="*.jsf, *.xhtml, *.html, *.jsp, *.js" />
  93.  
  94.     </bean>
  95.    
  96.     <!-- Mapeamento caso venha utilizar jsp -->
  97.     <bean name="indexController" class="org.springframework.web.servlet.mvc.ParameterizableViewController" lazy-init="false"/>
  98.    
  99.     <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer" lazy-init="false">
  100.         <property name="scopes">
  101.             <map>
  102.                 <entry key="view">
  103.                     <bean class=" jsfprimefaces.bean.geral.ViewScope" />
  104.                 </entry>
  105.             </map>
  106.         </property>
  107.     </bean>
  108.    
  109.     <bean id="reportUtil" class="jsfprimefaces.report.util.ReportUtil" />
  110.    
  111.     <bean id="utilFramework" class="jsfprimefaces.utils.UtilFramework" scope="session" />
  112.  
  113.        
  114. </beans>
Tags: jsf jdev caixaki
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement