Using @Valid on a container (java.util.List) is deprecated - #4250
Using @Valid on a container (java.util.List) is deprecated#4250verbitan wants to merge 2 commits into
Conversation
Signed-off-by: verbitan <verbitan@users.noreply.github.com>
|
One container-level @NotNull
@Valid
private LinkedHashMap<String, RouteProperties> routesMap = new LinkedHashMap<>();It's a live cascade target (bound as @NotNull
private LinkedHashMap<String, @Valid RouteProperties> routesMap = new LinkedHashMap<>();
|
Signed-off-by: verbitan <verbitan@users.noreply.github.com>
Good spot, thanks. |
Summary
Fixes deprecation warnings from Hibernate Validator about applying
@Validdirectly to container types.Detail
Spring Boot 4.1.0 upgraded to Hibernate Validator 9.1 which included a change deprecating the use of
@Validat the container level.Meaning that this:
Should be replaced by this:
Else these warnings are raised: