Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xmlns:tx = "http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/mvc
- http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
- default-lazy-init="true">
- <context:annotation-config />
- <mvc:annotation-driven />
- <mvc:default-servlet-handler />
- <mvc:resources location="/resources/img"
- mapping="/resources/**" cache-period="5000" />
- <context:component-scan base-package="jsfprimefaces.geral.controller" />
- <context:component-scan base-package="jsfprimefaces.srv.interfaces" />
- <context:component-scan base-package="jsfprimefaces.srv.implementacao" />
- <context:component-scan base-package="jsfprimefaces.repository.interfaces" />
- <context:component-scan base-package="jsfprimefaces.dao.implementacao" />
- <context:component-scan base-package="jsfprimefaces.bean.view" />
- <context:component-scan base-package="jsfprimefaces.bean.geral" />
- <context:component-scan base-package="jsfprimefaces.report.util" />
- <context:component-scan base-package="jsfprimefaces.util.all" />
- <context:component-scan base-package="jsfprimefaces.bean.view.grafico" />
- <context:component-scan base-package="jsfprimefaces.controller.crud" />
- <context:component-scan base-package="jsfprimefaces.interfac.crud" />
- <!-- Data Source -->
- <bean id="springDataSource" name="springDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="false">
- <property name="jndiName">
- <value>java:comp/env/jdbc/datasource</value>
- </property>
- </bean>
- <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate" lazy-init="false">
- <property name="dataSource" ref="springDataSource"/>
- <property name="baselineOnMigrate" value="true"/>
- <property name="table" value="version"/>
- <property name="sqlMigrationPrefix" value="v"/>
- <property name="sqlMigrationSeparator" value="_"/>
- <property name="encoding" value="ISO-8859-1"/>
- <property name="validateOnMigrate" value="false"/>
- </bean>
- <bean id="transactionManager" name="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager" lazy-init="false">
- <property name="dataSource" ref="springDataSource"/>
- </bean>
- <bean id="jdbcTemplate" name="jdbcTemplate" class="jsfprimefaces.implementacao.crud.JdbcTemplateImpl" lazy-init="false">
- <constructor-arg name="dataSource" ref="springDataSource"/>
- </bean>
- <bean id="simpleJdbcTemplate" name="simpleJdbcTemplate" class="jsfprimefaces.implementacao.crud.SimpleJdbcTemplateImpl" lazy-init="false">
- <constructor-arg name="dataSource" ref="springDataSource"/>
- </bean>
- <bean id="simpleJdbcInsert" name="simpleJdbcInsert" class="jsfprimefaces.implementacao.crud.SimpleJdbcInsertImplements" lazy-init="false">
- <constructor-arg name="dataSource" ref="springDataSource"/>
- </bean>
- <bean id="simpleJdbcClassImpl" name="simpleJdbcClassImpl" class="jsfprimefaces.implementacao.crud.SimpleJdbcClassImpl" lazy-init="false">
- <constructor-arg name="dataSource" ref="springDataSource"/>
- </bean>
- <!-- Mapeamento caso venha utilizar jsp -->
- <bean id="urlMapping"
- class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping" lazy-init="false">
- <property name="mappings">
- <props>
- <prop key="/index.jsp">indexController</prop>
- </props>
- </property>
- </bean>
- <!-- Mapeamento caso venha utilizar jsp -->
- <bean id="viewResolver"
- class="org.springframework.web.servlet.view.InternalResourceViewResolver" lazy-init="false">
- <property name="viewClass"
- value="org.springframework.web.servlet.view.JstlView" />
- <property name="prefix" value="/WebContent/" />
- <property name="suffix" value="*.jsf, *.xhtml, *.html, *.jsp, *.js" />
- </bean>
- <!-- Mapeamento caso venha utilizar jsp -->
- <bean name="indexController" class="org.springframework.web.servlet.mvc.ParameterizableViewController" lazy-init="false"/>
- <bean class="org.springframework.beans.factory.config.CustomScopeConfigurer" lazy-init="false">
- <property name="scopes">
- <map>
- <entry key="view">
- <bean class=" jsfprimefaces.bean.geral.ViewScope" />
- </entry>
- </map>
- </property>
- </bean>
- <bean id="reportUtil" class="jsfprimefaces.report.util.ReportUtil" />
- <bean id="utilFramework" class="jsfprimefaces.utils.UtilFramework" scope="session" />
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement