Problems may occur if you allow the client to set fields of type LocalDate, LocalTime and LocalDateTime. In general it's not a good idea to use the same class to both represent data in your database and data received from the client. For instance, what if I POST your JSON example from Germany? First of all, why can the client POST commentId, createdAt and updatedAt at all? Those fields should be determined by the server, not the client
Yes I will check this out and post the results here.
You can find out which of the two does it by printing the value of comment.updatedAt before you save it in the repository and after you retrieve it from the repository
Claude Moore wrote:In Spring Boot you could annotate with @Validated your @Service class to get all @Valid annotated params in methods to be validated.
Salil Wadnerkar wrote:@Valid is processed by Spring MVC for MVC controllers, not for any other classes.
This is so that it can return a bad request (400) error on these validation failures automatically.
which are having One-to-Many relationship.
Stephan van Hulst wrote:Why are those three sub-modules POM projects?
Stephan van Hulst wrote:No, <dependencyManagement> only configures dependencies, it doesn't include them.
Regardless, what you want isn't possible and doesn't make much sense. You can't use a JAR project as a parent, and declaring dependencies in a POM project doesn't make sense of you don't want to include them in child modules.