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是提供事務支持,並且支持外鍵和行級鎖等高級功能。