Lombok and Validation
Annotation magic in Spring boot.
1 min readSep 4, 2019
1. lombok: annotation processor @Data
- @Getter , @Setter
- @NoArgsConstructor
- @AllArgsConstructor
- @Builder
entity=domain model
2. validation: verify data from a client. @Valid
- @NotNull
- @NotEmpty
- @Size(max=10)
HTTP status 400 (Bad Request): it’s caused by client.
3. error
- Not Found HTTP status 404
- @ControllerAdvice
Recent work mobile web only! : https://coffee-hmm.inhibitor.io/
I want to talk about error only next time..