How do I update an entity using spring-data-jpa?

后端 未结 10 1874
眼角桃花
眼角桃花 2020-11-29 15:12

Well the question pretty much says everything. Using JPARepository how do I update an entity?

JPARepository has only a save method, which does not t

10条回答
  •  青春惊慌失措
    2020-11-29 15:42

    spring data save() method will help you to perform both: adding new item and updating an existed item.

    Just call the save() and enjoy the life :))

提交回复
热议问题