<?xml version="1.0" encoding="UTF-8"?>
<beans default-autowire="no" default-lazy-init="false"
default-dependency-check="none"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.0.xsd">
<!-- DB 설정파일 위치 지정 -->
<bean id="dbConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property
name="location"><value>WEB-INF/config/db.properties</value></property>
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName"><value>${jdbc.driverClassName}</value></property>
<property name="url"><value>${jdbc.url}</value></property>
<property name="username"><value>${jdbc.username}</value></property>
<property name="password"><value>${jdbc.password}</value></property>
<property name="maxActive"><value>${jdbc.maxActive}</value></property>
<property name="maxIdle"><value>${jdbc.maxIdle}</value></property>
<property name="maxWait"><value>${jdbc.maxWait}</value></property>
</bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value="WEB-INF/config/sqlMapConfig.xml" />
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="execute*" read-only="false" rollback-for="BizException" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="testServiceProcOperation" expression="execution(* test.logic.proc.*Proc.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="testServiceProcOperation"/>
</aop:config>
</beans>
'framework > spring' 카테고리의 다른 글
[Spring MVC] - @annotation 과 aspect를 활용한 파라미터 널 체크 (0) | 2012.05.14 |
---|---|
[quartz] - cronExpression 기간 설정 (0) | 2011.06.24 |
[problem] - web.xml 에 log4j 설정 (0) | 2011.01.28 |
[spring] - quartz 연동 시 scheduler 를 처음에 무조건 구동시키고 싶으면.. (0) | 2010.07.12 |