main - src - spring - root-context.xml
<!--<beans>안에 넣는다-->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager
">
<property name="dataSource" ref="dataSource">
<!--접속정보 저장된 name-->
</property>
</bean>
<!-- 트랜잭션 XML 방식 -->
<tx:advice id="txAdvice"
transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="print*" read-only="true" />
<tx:method name="register*" rollback-for="Exeption" />
<tx:method name="modify*" rollback-for="Exeption" />
<tx:method name="remove*" rollback-for="Exeption" />
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true">
<aop:pointcut
expression="execution(* com.kh.junspring..*Impl.*(..))" id="serviceMethod" />
<aop:advisor advice-ref="txAdvice"
pointcut-ref="serviceMethod" />
</aop:config>