transaction 수정
This commit is contained in:
parent
420293a935
commit
6eef5398cf
22
pom.xml
22
pom.xml
@ -551,6 +551,28 @@
|
|||||||
<version>1.0.0.71</version>
|
<version>1.0.0.71</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MyBatis -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis</groupId>
|
||||||
|
<artifactId>mybatis</artifactId>
|
||||||
|
<version>3.5.6</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis</groupId>
|
||||||
|
<artifactId>mybatis-spring</artifactId>
|
||||||
|
<version>2.0.6</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-jdbc</artifactId>
|
||||||
|
<version>4.3.22.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,9 +43,9 @@
|
|||||||
<bean id="mybatisSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
<bean id="mybatisSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||||
<property name="dataSource" ref="mybatisDataSource" />
|
<property name="dataSource" ref="mybatisDataSource" />
|
||||||
<property name="mapperLocations" value="classpath:/egovframework/sqlmap/config/mappers/**/*.xml" />
|
<property name="mapperLocations" value="classpath:/egovframework/sqlmap/config/mappers/**/*.xml" />
|
||||||
<property name="transactionFactory">
|
<!-- <property name="transactionFactory"> -->
|
||||||
<bean class="org.apache.ibatis.transaction.managed.ManagedTransactionFactory" />
|
<!-- <bean class="org.apache.ibatis.transaction.managed.ManagedTransactionFactory" /> -->
|
||||||
</property>
|
<!-- </property> -->
|
||||||
<property name="configLocation" value="classpath:/egovframework/spring/com/mybatis-config.xml"/>
|
<property name="configLocation" value="classpath:/egovframework/spring/com/mybatis-config.xml"/>
|
||||||
</bean>
|
</bean>
|
||||||
<bean id="mybatisSession" class="org.mybatis.spring.SqlSessionTemplate">
|
<bean id="mybatisSession" class="org.mybatis.spring.SqlSessionTemplate">
|
||||||
|
|||||||
@ -7,11 +7,20 @@
|
|||||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
|
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd">
|
||||||
|
|
||||||
<!-- transaction 설정 -->
|
<!-- transaction 설정 -->
|
||||||
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
<!-- <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||||
<property name="dataSource" ref="dataSource"/>
|
<property name="dataSource" ref="dataSource"/>
|
||||||
</bean>
|
<property name="dataSource" ref="mybatisDataSource" />
|
||||||
|
</bean> -->
|
||||||
<tx:advice id="txAdvice" transaction-manager="txManager">
|
|
||||||
|
<bean id="txManager1" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||||
|
<property name="dataSource" ref="dataSource"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="txManager2" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||||
|
<property name="dataSource" ref="mybatisDataSource"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<tx:advice id="txAdvice1" transaction-manager="txManager1">
|
||||||
<tx:attributes>
|
<tx:attributes>
|
||||||
<tx:method name="*" rollback-for="Exception"/>
|
<tx:method name="*" rollback-for="Exception"/>
|
||||||
</tx:attributes>
|
</tx:attributes>
|
||||||
@ -28,7 +37,27 @@
|
|||||||
execution(* kcc.xxx..*Impl.*(..)) or
|
execution(* kcc.xxx..*Impl.*(..)) or
|
||||||
execution(* seed.com..*Service.*(..))
|
execution(* seed.com..*Service.*(..))
|
||||||
"/>
|
"/>
|
||||||
<aop:advisor advice-ref="txAdvice" pointcut-ref="requiredTx" />
|
<aop:advisor advice-ref="txAdvice1" pointcut-ref="requiredTx" />
|
||||||
</aop:config>
|
</aop:config>
|
||||||
|
|
||||||
|
<tx:advice id="txAdvice2" transaction-manager="txManager2">
|
||||||
|
<tx:attributes>
|
||||||
|
<tx:method name="*" rollback-for="Exception"/>
|
||||||
|
</tx:attributes>
|
||||||
|
</tx:advice>
|
||||||
|
|
||||||
|
<aop:config>
|
||||||
|
<aop:pointcut id="requiredTx"
|
||||||
|
expression="
|
||||||
|
execution(* kcc.let..impl.*Impl.*(..)) or
|
||||||
|
execution(* kcc.com..*Impl.*(..)) or
|
||||||
|
execution(* kcc.ve..*Impl.*(..)) or
|
||||||
|
execution(* kcc.kccadr..*Impl.*(..)) or
|
||||||
|
execution(* kccadr..*Impl.*(..)) or
|
||||||
|
execution(* kcc.xxx..*Impl.*(..)) or
|
||||||
|
execution(* seed.com..*Service.*(..))
|
||||||
|
"/>
|
||||||
|
<aop:advisor advice-ref="txAdvice2" pointcut-ref="requiredTx" />
|
||||||
|
</aop:config>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user