We develop very usual spring MVC application
We have:
Controller layer (@RestComtroller + @GetMapping and @PostMapping)
Service layer(@Service)
Repository layer (CrudRepository from spring-data-jpa)
We use DTOs for communication between FE and BE.
Today my colleague asked me to mark all the DTOs as implements Serializable and add serialVersionUID field. I asked about reasons but he said that it is a "best practices". I am really confused about it. Serializable related to java serialization but we use JSON for BE and FE communication.
Could you clarify that question? So Should I mark spring mvc DTO with Serializable?