본문 바로가기

카테고리 없음

'@TRANSACTIONAL' 라이브러리 임포트 ㅋ

pom.xml에서

<dependency>
	<groupId>org.springframework</groupId>
	<artifactId>spring-tx</artifactId>
	<version>${org.springframework-version}</version>
</dependency>

 

root-context.xml에서

<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource"></property>
</bean>
<tx:annotation-driven/>