MySQL版本用的是5.7,MySQL的GTID指的是全局事务ID(global transaction identifier)

  ### Cause: java.sql.SQLException: Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.

  


  字面意思违反事务规则,详细原因当时没有想到。大连钢结构工程http://dljunxiang.com/

  参考网上意见,发现新建的MySQL数据库用的是MyISAM模式,这个模式是不支持事务。改成了InnoDB,InnoDB是提供事务支持,并且支持外键和行级锁等高级功能。