saveOrUpdate如果hibernate-mapping配置的主键已存在,就不会新增,会更新。 转载于:https://www.cnblogs.com/Alwaysbecoding/p/9494115.html