2011년 8월 24일 수요일
함수명파라미터, 인터셉터, FLEX 설정 셋팅-1(context-query.xml)
<?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:config="http://www.anyframejava.org/schema/service"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.anyframejava.org/schema/service http://www.anyframejava.org/schema/service/anyframe-core-service-2.0.xsd">
<bean name="queryService" class="anyframe.core.query.impl.QueryServiceImpl">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
<property name="pagingSQLGenerator" ref="pagingSQLGenerator"/>
<property name="sqlRepository" ref="sqlLoader"/>
<property name="lobHandler" ref="lobHandler"/>
</bean>
<bean name="sqlLoader" class="anyframe.core.query.impl.config.loader.SQLLoader">
<config:configuration>
<!-- xml files in classpath -->
<filename>classpath:config/query/**/mapping-*.xml</filename>
<nullcheck type="VARCHAR" default-value="" />
<sqlload dynamic="true" frequency="5" />
<skiperror>true</skiperror>
</config:configuration>
</bean>
<!-- The original JdbcTemplate definition -->
<bean id="jdbcTemplate" class="anyframe.core.query.impl.jdbc.PagingJdbcTemplate">
<property name="dataSource" ref="dataSource" />
<property name="exceptionTranslator" ref="exceptionTranslator" />
</bean>
<bean id="exceptionTranslator" class="anyframe.core.query.impl.util.RawSQLExceptionTranslator"/>
<!-- HSQL Paging -->
<bean id="pagingSQLGenerator" class="anyframe.core.query.impl.jdbc.generator.HSQLPagingSQLGenerator"/>
<!-- Oracle Paging -->
<!-- bean id="pagingSQLGenerator" class="anyframe.core.query.impl.util.OraclePagingSQLGenerator"/-->
<!-- LOB 설정 -->
<bean id="nativeJdbcExtractor"
class="org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor"
lazy-init="true" />
<bean id="lobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler"
lazy-init="true">
<property name="nativeJdbcExtractor" ref="nativeJdbcExtractor" />
</bean>
<!-- -->
<bean name="GeduTech.queryService" class="anyframe.core.query.impl.QueryServiceImpl">
<property name="jdbcTemplate" ref="GeduTech.jdbcTemplate"/>
<property name="pagingSQLGenerator" ref="pagingSQLGenerator"/>
<property name="sqlRepository" ref="sqlLoader"/>
<property name="lobHandler" ref="lobHandler"/>
</bean>
<!-- 교육지표 테스트 -->
<bean name="queryServiceProd" class="anyframe.core.query.impl.QueryServiceImpl">
<property name="jdbcTemplate" ref="jdbcTemplateProd"/>
<property name="pagingSQLGenerator" ref="pagingSQLGenerator"/>
<property name="sqlRepository" ref="sqlLoader"/>
<property name="lobHandler" ref="lobHandler"/>
</bean>
<!-- 교육지표 테스트 -->
<bean id="jdbcTemplateProd" class="anyframe.core.query.impl.jdbc.PagingJdbcTemplate">
<property name="dataSource" ref="dataSourceProd" />
<property name="exceptionTranslator" ref="exceptionTranslator" />
</bean>
<!-- 교육지표 테스트 -->
</beans>
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기