Lombok and Validation

Annotation magic in Spring boot.

Jiyun Park
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..

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response