Spring MVC - 12. Delete

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2025

ความคิดเห็น •

  • @DucaTech
    @DucaTech 2 ปีที่แล้ว +3

    The better design is not a hard delete, but a soft delete. So that means, the entry still remains in the DB but has a flag isActive = false, or isDeleted_ = true, and increment a version #. So the latest version of that entry will have either one of those flags to indicate it is 'deleted'.

    • @alvespintoandre
      @alvespintoandre ปีที่แล้ว +1

      HTML doesnt support Delete or Put Methods.

  • @wiekusviljoen1822
    @wiekusviljoen1822 ปีที่แล้ว

    Hi Teddy
    You made the Running App in Java and C#. Which did you enjoy more and why?

    • @TeddySmithDev
      @TeddySmithDev  ปีที่แล้ว

      I honestly like C# more overall as a language, but there is so many jobs in Java that I still code in it. C# is far less verbose and elegant, but Java has better ORM. I like C# more but Java is close.

  • @luck8citygod
    @luck8citygod ปีที่แล้ว

    Like

  • @damjandjordjevic1994
    @damjandjordjevic1994 2 ปีที่แล้ว

    What are the pros and cons of using @GetMapping over @DeleteMapping (besides the @Delete being a post request, and @Get a get request)?

    • @TeddySmithDev
      @TeddySmithDev  2 ปีที่แล้ว

      DeleteMapping looks better and will accept actual DELETE requests. The way I did it works but only works with GET requests. Diffferent ways to achieve same outcome.

    • @vaiterius
      @vaiterius ปีที่แล้ว

      html forms unfortunately do not support DELETE and PUT requests