Thoughts, stories and ideas.
aldora
  • Home
  • About
  • Archive
Subscribe
Java

Spring Annotation @Validated and @Valid

Aldora L

Aldora L

Oct 25, 2022 1 min
@Validated @Valid
mark a member attribute for validation ✖️ ✅
group-level validation ✅ ️ ✖️
mark request parameter for validation ✅ ✅

Example 1

validated-valid-1

Example 2

validated-valid-2

This note borrows code from Differences in @Valid and @Validated Annotations in Spring

Read next

Articles Recommendation and Summary for Spring RestTemplate Configuration

While learning how to configure RestTemplate, I find there are many things to config, and I lack brief understanding of RestTemplate. After searching and reading, I wrote this article to summary the things I learned to help me remember them. RestTemplate Configuration Outline Usually, RestTemplate need to config its HTTP
Aldora L Apr 14, 2023

ANTLR Error Handle

In this article, I will show you how ANTLR handles errors by default and how to write your own ANTLR error listener, and all the code involved is in this repo. ANTLR Default Error Behavior ANTLR has great error reporting and error recovery abilities. By default, it would only print
Aldora L Feb 22, 2023

ANTLR Quick Start: Calculator Example

I will show you a simple calculator example built with ANTLR and Java to help you understand basic concepts and rules of ANTLR. All the code shown below is in this repo ANTLR ANTLR(ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating
Aldora L Feb 22, 2023

Subscribe to aldora

Don't miss out on the latest news. Sign up now to get access to the library of members-only articles.
aldora © 2025. Powered by Ghost