spring boot保存后返回id

在sql配置文件中加上useGeneratedKeys="true" keyProperty="id"就行了,id并不固定,是表的要返回字段。

spring boot保存后返回id_第1张图片

你可能感兴趣的:(spring boot保存后返回id)