SPRING_SETTING/applicatioinContext.xml_setting applicationContext.xml - version 0.01 우혁이 아빠 2012. 1. 30. 17:42 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" default-autowire="byName" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-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"> <!-- ======================================================================== component scan for service, repository ======================================================================== --> <context:component-scan base-package="com.tistory.tazz009.test"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!-- ======================================================================== Database Setting ======================================================================== --> <context:property-placeholder location="classpath:/spring/db.properties" /> <!-- ======================================================================== DataSource for default ======================================================================== <bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource"> <property name="driverClass" value="${db.driverclassname}" /> <property name="url" value="${db.url}" /> <property name="username" value="${db.username}" /> <property name="password" value="${db.password}" /> </bean> --> <!-- ======================================================================== DataSource for JNDI ======================================================================== --> <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>hitms</value> </property> </bean> <!-- ======================================================================== Trsansaction Manager ======================================================================== --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource" /> </bean> <!-- ======================================================================== iBatis Setting ======================================================================== --> <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <property name="configLocation" value="classpath:/spring/ibatis-config.xml" /> <property name="dataSource" ref="dataSource" /> </bean> <bean id="sqlMapClientTemplate" class="org.springframework.orm.ibatis.SqlMapClientTemplate"> <property name="sqlMapClient" ref="sqlMapClient" /> </bean> <!-- ======================================================================== This tells Spring to activate annotation-driven transactions ======================================================================== --> <tx:annotation-driven /> </beans> 공유하기 게시글 관리 행복 만들기 - 믿고, 사랑하고 기다리기 저작자표시