---
title: "（MySQL）Spring3+Mybatis3使用注解式事务声明（@Transactional）无法回滚"
author: "hellostory"
date: "2012-01-13T10:18:00Z"
tags: []
slug: "mysql-spring3-mybatis3-transactional"
draft: false
lastmod: "2012-02-22T11:13:12Z"
id: 1416472
url: "https://hellostory.iteye.com/blog/1416472"
---

按以下步骤进行检查：

1、检查下Spring3配置没问题（略）；

2、检查Log4J日志输出，确实有进行事务回滚动作；

3、检查下MySQL后台日志输入，确实有进行“rollback”操作；

上网查找一番，终于找到解决方法！原来执行事务回滚的表默认“**表类型**=**MyISAM**“（网上说：MyISAM不支持事务！这个我不太清楚）

使用如下语句更改表类型为”**InnoDB**“：

其中，”equ\_upkeep\_plan“为表名！